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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
astahir85
Regular Visitor

Need help with RANKX and assigning variables based on min max dynamically

Hi power users,

 

I have a set of data that I need some help with. Here is my case. I have a table as such

 

Part Number - Revenue - Margin - Qty

0100 - $55 - 30% - 2

0200 - $600 - 20% - 10

0300 - $25 - 70% - 5

0400 - $679 - 80% - 60

0500 - $750 - 10% - 100

 

I'd like to create a dynamic measure that help me assign a variable to anything over $50 revenue as A, anything between $25 - $50 as B and below $25 as C. The issue is, I need it to be dynamic because this table with the same part numbers maybe different for different stores. i.e. 0100 maybe $30 with 25% and 100 qty. in that case, 0100 should be B and A - based on how I filter the visual/page.

 

Can someone please help me with this?

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User
10 REPLIES 10
amitchandak
Super User
Super User

Thanks Amit, I feel like such a noob

Thanks Amit, one more question. How can I look at a donut chart to see what percentage is A, B or C in terms of percentage. I can't drag A/B/C measure to values/legend, can only add it to tooltips. Hence I can't see what percentage was A or B or C

Under format option -> Detail labels -> label Style

Screenshot 2019-08-30 00.01.26.png

Hi Amit

 

I am adding 'Part number' in legend, 'Revenue' in Values and 'ABC' in Tooltips (can't move it anywhere else). This is not allowing me to see what you have. 

Hi Amit

 

Any idea how I can distinct count this measure?

Drag a field on the graph under Value. The down angle or right-click will give you count distinct options. This only for columns not for measures.

Screenshot 2019-09-03 21.15.17.png

 

So I am using this formula

AAA Qty =IF([Total Qty]>100, "A", IF([Total Qty]>50, "B", "C"))
 
and when I drag this measure to the page it goes under toolstips rather than axis
 
 
image.png

Are you not able to drag it into the axis box ?

No, it doesn't allow me. Doesn't flag me either, but any other table I can move it just not this measure

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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