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! It's time to submit your entry. Live now!
keep only the inHi All,
I have the Report where I Need the Top 5 Veh_Models and Top 1 Veh_Details in a table I have tired TOPN for Veh_Models within the Visuals and cretaed a Measure [Top 1 Veh_Details] as follows, It's working fine whowhen i try to filter via country slicer we have a ties it's shown me the Top all the Veh_Details rows with ties however I need to keep only the Top 1.
Please asssit me how can I get only the Top 1 Record for the Veh_Details . Thanks
Counts = CALCULATE( COUNTROWS('Dataset'))
Top 1 Veh_Details =
VAR Rank5 = RANKX( ALLSELECTED('Dataset'[Vehicle_Detailed_Model]) , [Counts],,DESC,Skip)
VAR Result = IF( Rank5 = 1 , 1 )
RETURN
Result
Solved! Go to Solution.
Hi @Suhel_Ansari ,
According to your description, here are my steps you can follow as a solution.
(1) This is my test data.
(2) We can create a measure.
Top 1 Veh_Details =
VAR Rank5 = RANKX(ALLSELECTED('Dataset'),[Counts],,DESC,Skip)
VAR Result = IF( Rank5 = 1 , 1,BLANK() )
RETURN
IF(Result=1,MAX('Dataset'[detail]),BLANK())
(3) Then the result is as follows.
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Suhel_Ansari ,
According to your description, here are my steps you can follow as a solution.
(1) This is my test data.
(2) We can create a measure.
Top 1 Veh_Details =
VAR Rank5 = RANKX(ALLSELECTED('Dataset'),[Counts],,DESC,Skip)
VAR Result = IF( Rank5 = 1 , 1,BLANK() )
RETURN
IF(Result=1,MAX('Dataset'[detail]),BLANK())
(3) Then the result is as follows.
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
| User | Count |
|---|---|
| 47 | |
| 45 | |
| 33 | |
| 33 | |
| 30 |
| User | Count |
|---|---|
| 136 | |
| 116 | |
| 58 | |
| 58 | |
| 56 |