sort order
1 TopicCircular dependency error with sort order column
I have a Documents fact table with several columns including a DocID and one that indicates the percent of the document that is new content. The structure looks like this: DocID Title PctNew 1 Title A 50% 2 Title B none 3 Title C all new content 4 Title D 50% 5 Title E 25% 6 Title F all new content 7 Title G none 8 Title H 50% 9 Title I 25% 10 Title J none I want to summarize the number of documents by PctNew. To do this, I've created a measure: CountPctNew = COUNT(Documents[PctNew]) (I'm using COUNT rather than COUNTX because I want a count of blank rows.) I've also created a dimension table: dim_PctNew = DISTINCT(Documents[PctNew]) I join the tables with dim_PctNew[PctNew] on the 1 side and Documents[PctNew] on the many side. Finally, I create a new column in the dim_PctNew table: SortOrder = SWITCH([PctNew], "all new content", 1, "75%", 2, "50%", 3, "25%", 4, "none", 5, 6 ) Using a matrix visual, I can sum the occurrences of each PctNew value using the CountPctNew measure. But if I select dim_PctNew[PctNew], choose 'Sort by column' , and choose the SortOrder column, I get: Error A circular dependency was detected: dim_PctNew[PctNew], dim_PctNew[SortOrder], dim_PctNew[PctNew] (The same thing happens if I bypass the dimension table and simply add the SortOrder column to the Documents table.) How can I create a sort order column without a circular dependency?Solved3.1KViews0likes2Comments