Forum Discussion
afaherty
Helper V
21 days agoWhy does a sorting column affect DAX measures?
I have had this issue happen to me many times over the past few years and I don't understand it, so I was hoping someone else might! Let's say I have a table of student grades: Studen...
- 20 days ago
Hi,
when the description is not sorted by the sort order column, and when run the visualization's dax query view,
the DAX query does not contain sort order column, so the measure does not need to include sort order column.
However, when the description column is sorted by the sort order column, then you query it,then, the query contains sort order column, even the visual does not show sort order column, so in this case, measure need to contain this sort order column as well.
Shubham_rai955
Super User
11 days agoPlease check below points:
- Check the relationship. Make sure Description in your main table has a valid relationship to the Sort Order table and that the relationship cardinality and filter direction are correct.
- Check the measure's filter context. If your measure uses ALL, ALLEXCEPT, REMOVEFILTERS, or DISTINCTCOUNT, sorting may reveal an existing filter-context issue.
- Check for duplicate descriptions. Each description must map to exactly one sort value. For example, Average should always map to 2.
- Test with a separate dimension table. Create a dimension containing one row per description and its sort order. Sort the dimension's Description column by its Order Sort column, then use the dimension's description in your visuals.