Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
powertechbi
Frequent Visitor

Help With High and Lower Ranks

Good afternoon

I'm putting together a dashboard and I'm stuck on a question.

I need to create a graph that shows the largest / smallest values ​​depending on the quantity selected. In other words, I am creating a ranking where the user selects how many values ​​they want to see and whether they want to see the ranking of highest values ​​or lowest values.

I created all the measurements. And I was successful in bringing the highest values, but when I select the option to bring the lowest values ​​it doesn't bring anything.

I included the images below with the measurements and everything. If anyone can help me, I'd appreciate it.

 

HELP 3.jpgHELP 2.jpgHELP 1.jpg

5 REPLIES 5
v-zhengdxu-msft
Community Support
Community Support

Hi @powertechbi 

 

I did some test, but your measure seems working well in my side, I can't reproduce your problem.

 

So if possible, could you please provide more raw data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples? It would be helpful to find out the solution. You can refer the following links to share the required info:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

 

 

Best Regards

Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Good morning

Thanks for the answer.

I am attaching the Pbix file with the information I am working on.

When you open it, you can see that when I ask for the highest values ​​to be displayed according to the measure and rank applied, it is being displayed correctly. However, when requesting that the smallest values ​​be displayed, the graph and table are blank

 

Link File PBIX: 

https://drive.google.com/file/d/1xFk97jH8hI1CDsr3UVmkZa8wOsux_Uwz/view?usp=sharing 

Hi @powertechbi 

 

Sorry for the late reply, I'm requesting access:

vzhengdxumsft_0-1731394884403.png

 

 

Best Regards

Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

rajendraongole1
Super User
Super User

Hi @powertechbi - From your screenshot, I see that you've set up measures for calculating dynamic rankings, but the issue seems to occur when you try to display the lowest values.

In your Medidas Dinamicas Venda measure, the SWITCH function seems to check if _MedidasAtivas=0 to show the highest or lowest values. Ensure that this condition matches the selected option for "lowest values."

It appears you're using SELECTEDVALUE to get the user's choice from a slicer or parameter. Make sure the slicer or parameter you’re using is correctly connected to _MedidasAtivas and that it has appropriate values (e.g., 0 for highest values, 1 for lowest values).

If the existing ranking isn’t working as expected, you might consider creating a separate measure using RANKX.

Rank =
RANKX(
ALLSELECTED(TableName),
[Your Measure],
,
ASC/DESC,
Dense/Skip
)

Create a Parameter for Top/Bottom Selection and use it in your measure.
Use RANKX in your measure to dynamically sort and filter based on the top/bottom selection.

 

If these steps don’t resolve the issue, feel free to share more details





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

Find out what's new and trending in the Fabric Community.