Forum Discussion
Anonymous
6 years agoNot applicable
Top 5 with Other Column
Hi Team, Need DAX help! I am looking for Top5 customer and their top unit in column.Apart from the Top 3 units which are in column I want to add all sales in Other column and then a Total Sal...
Greg_Deckler
Community Champion
6 years agoAnonymous - Take a look at the Complex Filter, it has a matrix example and similar use case to what you are looking to do. Not exact, but similar. https://community.powerbi.com/t5/Quick-Measures-Gallery/The-Complex-Selector/m-p/1116633#M534
- Anonymous6 years agoNot applicable
Hi Greg_Deckler
I am able to fetch the top 3 unit using below DAX and top5 suppliers by using filter and TopN option. The only issue is with Other column (In which I need sum of all sales except those values which are available in top3 units).
If you can help me how I can create other column in matrix. It would be a great help.
Top5 =VAR __topN = 3VAR __Unit =RANKX (ALLSELECTED ( Table [Sales]),CALCULATE([Total Sales,ALLEXCEPT(Table, Table[Unit] ) ),,DESC,DENSE) <= __topNRETURNIF( __unit, [Total_sales] )How to add other column in matrix without disturbing the above DAX.RegardsUphar