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
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.
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:
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.
Hi,
I have released access, you can check, please.
https://drive.google.com/file/d/1xFk97jH8hI1CDsr3UVmkZa8wOsux_Uwz/view?usp=sharing
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
Proud to be a Super User! | |
User | Count |
---|---|
115 | |
95 | |
87 | |
76 | |
65 |
User | Count |
---|---|
138 | |
113 | |
110 | |
98 | |
93 |