Forum Discussion
Anonymous
6 years agoNot applicable
TopN function cant display on the matrix
Hi, community, Please see the attached picture. I have a TOPN measure. I would like to get the top 10 customers based on the sales amount. TOP10PCUSTOMERBYSALES1 = TOPN(10,VALUES(Orders[Customer ...
amitchandak
Super User
6 years agoAnonymous , refer , if this can help
https://databear.com/power-bi-dax-topn-function/
TOP10PCUSTOMERBYSALES1 =
VAR
ranking = VALUES(Orders[Customer ID])
Return
CALCULATE(SUM(Orders[Sales]),
TOPN(10,ALL(Orders[Customer ID]),SUM(Orders[Sales])),
ranking,DESC)
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