Forum Discussion
Anonymous
6 years agoNot applicable
top5
Hi everyone,
i want to filter top 5 by cost of material and visualize it. The following DAX doesnt yield the desired result
Top5 = TOPN(5; SUMMARIZE(Sheet1; Sheet1[Material];"devcosts"; SUM[costs])
after breaking down the DAX to
tmptable = SUMMARIZE(Sheet1; Sheet1[Material];"devcosts"; SUM[costs])
i could see that the cost column is unsorted, like so
how can i get a sorted cost column for the TOPN function to select from and deliver the right solution.
thanks in advance
Anonymous
Try following
Top5 = TOPN ( 5, SUMMARIZE ( Sheet1, Sheet1[Material], "devcosts", SUM[costs] ), [devcosts], DESC )
2 Replies
- Zubair_MuhammadCommunity Champion
Anonymous
Try following
Top5 = TOPN ( 5, SUMMARIZE ( Sheet1, Sheet1[Material], "devcosts", SUM[costs] ), [devcosts], DESC ) - v-diye-msftCommunity Support
Hi Anonymous
If you've fixed the issue on your own please kindly share your solution. if the above posts help, please kindly mark it as a solution to help others find it more quickly. thanks a lot!