Forum Discussion
Select topn value without duplicate
- 6 years ago
Hi Anonymous ,
We create a sample, that Total has two rows same value.
Then we can create a calculate table using the following formula.
Table 2 = TOPN ( 20, SUMMARIZE ( 'factQuotes', 'factQuotes'[Total], "name", CALCULATE ( MAX ( 'factQuotes'[name] ) ) ), 'factQuotes'[Total], ASC )If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
BTW, pbix as attached.
Anonymous , for this you need add a very small random number while creating the rank
https://docs.microsoft.com/en-us/dax/rand-function-dax -RAND()
Refer the approach in - Same should work in TOP N
https://databear.com/how-to-use-the-dax-rankx-function-in-power-bi/
https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale
For Rank Refer these links
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale
https://community.powerbi.com/t5/Community-Blog/Dynamic-TopN-made-easy-with-What-If-Parameter/ba-p/367415