Forum Discussion

afaherty's avatar
afaherty
Icon for Helper V rankHelper V
21 hours ago

Why 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:

StudentIDTestDescriptionOrder Sort - From Sort Order Table
1Test 1Average2
1Test 2Average2
1Test 2Average2
2Test 1Above Average1
2Test 2Average2
2Test 3Below Average3
3Test 1Average2
3Test 2Below Average3
3Test 3Below Average3
4Test 1Average2
4Test 2Average2
4Test 3Average2
5Test 1Above Average1
5Test 2Above Average1
5Test 3Above Average1

There is a relationship between the table above and this "Sort Order" table below:

DescriptionOrder Sort
Above Average1
Average2
Below Average3

Next, I have some measures that calculate percentages that do not involve the "Order Sort" column at all. I have charts and matrices that utilize these measures. Everything looks great. However, if I then go into the data view of the first table, select the "Description" column, and sort by the "Order Sort" column, all of my percentages in my charts/matrices change, and they are all incorrect.

I am going crazy and have given up on trying to sort since it ruins my measures!

1 Reply

  • littlemojopuppy's avatar
    littlemojopuppy
    Icon for Community Champion rankCommunity Champion

    afaherty​ can you provide a PBIX?  Difficult to offer any insight without seeing some data and understanding the DAX in the measures...