Forum Discussion
Sort Order Impacting Measures
Hi Anonymous ,
I am not clear about your requirement and your data structure, if possible could you please inform me more detailed information(such as your expected output and your sample data)? Then I will help you more correctly.
Please do mask sensitive data before uploading.
Thanks for your understanding and support.
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous6 years agoNot applicable
My sample data looks like this:
Time Period Brand Sales TY B1 100 YA B1 100 YA B2 1110 TY B2 1100
Hi
Apologies for the bad explanation of the problem
Situation:
I was using a measure to calculate change in sales: Sales(TY)/Sales(YA)-1. It was working perfectly.
Problem:
However, when I was plotting a clustered column chart with brands in axis and TY/YA as legends and value. I couldn't control the TY/YA.
Hence, I created a table with index of TY as 2 and YA as 1. I used related function to bring the index values to the sales table after creating relationship on Time Period. Then I sorted column Time Period on basis of Index. This is when my change measures stopped working and started giving me error.
I am a newbie in DAX, please can you help me by pointing out what did I do wrong in this case?
- dax6 years agoCommunity Support
Hi Anonymous ,
I think this can't sort by legend column(it seems to be related to value and axis ). In addition, if possible, could you please inform me your expected output? Then I will help you more correctly.
Please do mask sensitive data before uploading.
Thanks for your understanding and support.
Best Regards,
Zoe ZhiIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous6 years agoNot applicable
I want to bring change the order of legends from TY/YA to YA/TY. Hence, I had used the re-ordering using a index column. However, as soon as I brought in the index column and sorted the TY/YA column basis index my change measures stopped working and gave error.