Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I want to rank my table having sales value, clientid and year such that it shows me rank of clients based on there salesvalue for each year.
Kindly help me to write dax to achieve the same.
Thanking in anticipation.
Solved! Go to Solution.
Hi @Anonymous,
Please try this [Rank] measure:
Rank =
RANKX (
ALLEXCEPT ( 'Client sales', 'Client sales'[Year] ),
CALCULATE (
SUM ( 'Client sales'[SalesValue] ),
ALLEXCEPT ( 'Client sales', 'Client sales'[Clientid], 'Client sales'[Year] )
),
,
DESC,
DENSE
)
Best regards,
Yuliana Gu
Hi @Anonymous,
Please try this [Rank] measure:
Rank =
RANKX (
ALLEXCEPT ( 'Client sales', 'Client sales'[Year] ),
CALCULATE (
SUM ( 'Client sales'[SalesValue] ),
ALLEXCEPT ( 'Client sales', 'Client sales'[Clientid], 'Client sales'[Year] )
),
,
DESC,
DENSE
)
Best regards,
Yuliana Gu
Hi ,
Table with dummy data that i am using is below, need to rank them:
Hope this helps!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!