Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi All,
I have a measure that calculate Total Cost of products. The measure is working fine if Financial Year, Brand or any other context is selected. I am new to Power Bi therefore struggling to create Ranking for Item name by Total cost. however Ranking by Brand is working fine.
Below are my all measures:
Solved! Go to Solution.
Hi @nadeemrajabali ,
Sorry for misunderstanding.
Create a calculated column as below:
Merged = 'data'[Brand Name]&"|"&'data'[Item Name]&"|"&"$"&'data'[Total Cost]
Put "Merged" in the field of a slicer and you will see:
For the related .pbix file,pls see attached.
Best Regards,
Kelly
Did I answer your question? Mark my reply as a solution!
Try this:
Brand Ranking by Total Cost =
RANKX (
FILTER ( Brand, Brand[Item Name] = EARLIER ( Brand[Item Name] ) ),
[Total Cost],
,
DESC,
DENSE
)
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
@VahidDM Thanks for your reply.
My Brand Ranking is working correctly. I am having issues with ranking my items (Products) below is the snip of Model
So once this ranking is resolved, I want to create the slicer list by combining Item Name column, Total Cost Measure and Item Rank Measure.
Hope this make sense.
Hi @nadeemrajabali ,
Could you pls provide some dummy data for test?
Remember to remove the confidential information.
Best Regards,
Kelly
Did I answer your question? Mark my reply as a solution!
Hi Kelly,
Please see below sample data.
1) I wante to rank all items within Brand in DESC order
2) I want make a slicer where Rank | Item name | Total Cost is coming up as dropdown list. I only want TOP 20 products to be loaded in this slicer depending on my other slicer being selected.
Hope you can help.
Thanks
Nadeem
Hi @nadeemrajabali ,
Create a measure as below:
Measure =
RANKX (
FILTER ( ALLSELECTED ( data ), 'data'[Brand Name] = MAX ( 'data'[Brand Name] ) ),
CALCULATE ( MAX ( 'data'[Total Cost] ) ),
,
DESC,
DENSE
)
Make a selection in filter pane as below:
And you will see:
For the related .pbix file,pls see attached.
Best Regards,
Kelly
Did I answer your question? Mark my reply as a solution!
Awesome, thanks Kelly. My half problem is solved.
The Slicer I am looking for is a list in below format:
Rank | Item Name | Total Cost
For example: like below: I can make it in Excel but not sure if it's possible in Power Bi?
This allow the list to be in sorted order as well as gives user a sanity what he/she is selecting from drop down list.
Hi @nadeemrajabali ,
Yes,click the dropdown button on the right upper corner of slicer to change the slicer type>choose: dropdown:
And you will see:
Best Regards,
Kelly
Did I answer your question? Mark my reply as a solution!
Hi @v-kelly-msft ,
Thanks for your help again. But this is not I want in my drop list. I want my list as merged of three columns kind of a dynamic list. The reason I want it like this to have my list sorted as per ranking. In your drop down list. It's sorted by item # also the $ value is not the list.
Hi @nadeemrajabali ,
Sorry for misunderstanding.
Create a calculated column as below:
Merged = 'data'[Brand Name]&"|"&'data'[Item Name]&"|"&"$"&'data'[Total Cost]
Put "Merged" in the field of a slicer and you will see:
For the related .pbix file,pls see attached.
Best Regards,
Kelly
Did I answer your question? Mark my reply as a solution!
Awesome, thanks Kelly highly appreciated
Hi @nadeemrajabali ,
Glad to help.🙂
Best Regards,
Kelly
Did I answer your question? Mark my reply as a solution!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
94 | |
77 | |
65 | |
53 |
User | Count |
---|---|
145 | |
105 | |
104 | |
90 | |
63 |