Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi, @VinnuVas
May I ask if this is the expected output you are looking for? Based on your description, I have created a measure to achieve the effect you are looking for. Following picture shows the effect of the display.
Measures:
Sales Rank =
VAR _allProduct =
CALCULATE ( COUNTROWS ( ALL ( 'Table' ) ) )
VAR _rank =
RANKX (
ALL ( 'Table'[Product] ),
CALCULATE ( SUM ( 'Table'[Sales] ) ),
,
DESC,
DENSE
)
RETURN
IF ( ISFILTERED ( 'Table'[Product] ), _rank & " Out of " & _allProduct )
If this does not work, could you please share some sample data without sensitive information and expected output.
How to provide sample data in the Power BI Forum - Microsoft Fabric Community
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hi, @VinnuVas
May I ask if this is the expected output you are looking for? Based on your description, I have created a measure to achieve the effect you are looking for. Following picture shows the effect of the display.
Measures:
Sales Rank =
VAR _allProduct =
CALCULATE ( COUNTROWS ( ALL ( 'Table' ) ) )
VAR _rank =
RANKX (
ALL ( 'Table'[Product] ),
CALCULATE ( SUM ( 'Table'[Sales] ) ),
,
DESC,
DENSE
)
RETURN
IF ( ISFILTERED ( 'Table'[Product] ), _rank & " Out of " & _allProduct )
If this does not work, could you please share some sample data without sensitive information and expected output.
How to provide sample data in the Power BI Forum - Microsoft Fabric Community
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
if you want to create w rank measure , that takes into account the slicer selection,
try this ;
rankx(
allselected(table_name[column_name])
, [ Sales amount]
)
if what you want shouldnt take into consideration the slicer selections, simply replace allselected with all
hope this helps
Hi @VinnuVas
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
| Product | Sales | Quantity | Category |
| Dell | 240 | 15 | Business |
| HP | 360 | 18 | Business |
| Lenovo | 480 | 32 | Gaming |
| Acer | 570 | 40 | Gaming |
| Apple | 180 | 12 | General |
And what are you ranking here?
firstly we calculated total sales and will show the rank of product
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.