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

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.

Reply
orangeatom
Resolver I
Resolver I

Best approach to rank + ratio of measures

Hello all,

I need some guidance on creating some measures to deliver a KPI.

I'd like to take the top n customers (denominator) and find out how many of those customers are selling more than x dollars (numerator). Then I will need to present that as a ratio. What is the best way in approaching this?

Direction will be greatly appreciated!

1 ACCEPTED SOLUTION
orangeatom
Resolver I
Resolver I

I have found how to accomplish my ambigous request but i'm not sure if this is the most efficient method:

 

1 - Use the SUMMARIZEDCOLUMNS function with a filter using RANKX

entity =
FILTER(
SUMMARIZECOLUMNS(
entity[attribute],
"column",[attribute]
),
RANKX (
ALL ( entity[attribute] ),
[attribute]
) <= n
)

2 - Create a column flagging x dollars

Flag =
IF(
[attribute] > 0,
1,
0
)

3 - Create measures to get performance

Ratio = ([Indicator]/n)*100

View solution in original post

2 REPLIES 2
orangeatom
Resolver I
Resolver I

I have found how to accomplish my ambigous request but i'm not sure if this is the most efficient method:

 

1 - Use the SUMMARIZEDCOLUMNS function with a filter using RANKX

entity =
FILTER(
SUMMARIZECOLUMNS(
entity[attribute],
"column",[attribute]
),
RANKX (
ALL ( entity[attribute] ),
[attribute]
) <= n
)

2 - Create a column flagging x dollars

Flag =
IF(
[attribute] > 0,
1,
0
)

3 - Create measures to get performance

Ratio = ([Indicator]/n)*100

@orangeatom,

Have you got expected result via the above method? The formulas you post are OK in my opinion. You can accepe your reply as answer,  this way, other community members would easily find the answer when  they get same issues.

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.