diff --git a/src/Dax.Model.Extractor/StatExtractor.cs b/src/Dax.Model.Extractor/StatExtractor.cs index 16b4ff4..0c7e8bb 100644 --- a/src/Dax.Model.Extractor/StatExtractor.cs +++ b/src/Dax.Model.Extractor/StatExtractor.cs @@ -40,7 +40,7 @@ public void LoadRelationshipStatistics(int sampleRows = 0,bool analyzeDirectQuer // only get relationship stats if the relationship has an ID var relationshipList = DaxModel.Relationships.Where(r => r.Dmv1200RelationshipId != 0) .Where(rel => - // we are analyzing DQ and both columns are in a table with DQ partitions + // we are analyzing DQ and either column is in a table with DQ partitions (analyzeDirectQuery && ((rel.FromColumn.Table.HasDirectQueryPartitions) || (rel.ToColumn.Table.HasDirectQueryPartitions))) // or we are analyzing DL and either column is in a table with DL partitions