Forum Discussion
Dynamic Bottom N + Other's category
Hello...
I have created a DAX for Dynamic Top N + Others by using below dax
I just want create same for Bottom N + others. Kindly help me
You can change the order of the TOPN. By default it uses descending order, so will place the higher values first. If you change it to add ASC after the revenue measure it will show you the worst performing products.
3 Replies
- johnt75
Super User
You can change the order of the TOPN. By default it uses descending order, so will place the higher values first. If you change it to add ASC after the revenue measure it will show you the worst performing products.
- Srihari_AdabalaNew Member
Thanks johnt75
It worked for me....
DAX solution for referenceBottom N Products =VAR TopNSelected = SELECTEDVALUE('Profitability n'[Profitability n])VAR TopRevTable = TOPN(TopNSelected,ALLSELECTED('Pseudo Products'),[Revenue],1)VAR TopRevenue = CALCULATE([Revenue],KEEPFILTERS(TopRevTable))VAR OtherValues = CALCULATE([Revenue],ALLSELECTED('Pseudo Products')) - CALCULATE([Revenue],TopRevTable)VAR CurrentBU = SELECTEDVALUE('Pseudo Products'[ProductName])RETURNIF (CurrentBU <> "Others", TopRevenue,OtherValues)
- v-zhangti
Community Support
Hi, Srihari_Adabala
Can you provide sample data for testing? Sensitive information can be removed in advance. What kind of expected results do you expect? You can also show it with pictures. I look forward to your response.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.