Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
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.
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
93 | |
60 | |
43 | |
35 | |
34 |