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
Campolas
Regular Visitor

Ranking by KPIS

Hi folks!

 

I need to ranking my sellers using 5 KPIS x target, its possible using IF and RANK?

 

Ex:

Target KPI A = 95%
Target KPI B = 80%

 

Seller 1  - 
KPI A = 90%
KPI B = 80%

 

Seller 2 - 
KPI A = 100%
KPI B = 80%


MONTH RANK 
1º -Seller 2 
2º Seller 1 

 

Rgdrs, 

1 ACCEPTED SOLUTION
v-yangliu-msft
Community Support
Community Support

Hi  @Campolas ,

I created some data:

vyangliumsft_0-1658223248834.png

Here are the steps you can follow:

1. Select two columns – Unpivot Columns.

vyangliumsft_1-1658223248839.png

2. Create calculated column.

Index =
IF(
    'Table'[Value]>='Table'[Target],
RANKX(
    FILTER(ALL('Table'),
    'Table'[KPI]=EARLIER('Table'[KPI])),[Value],,DESC),0)

3. Create measure.

Rank =
SUMX(
    FILTER(ALL('Table'),
    'Table'[Attribute]=MAX('Table'[Attribute])),[Index])

4. Result:

vyangliumsft_2-1658223248839.png

If you need pbix, please click here.

 

Best Regards,

Liu Yang

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

View solution in original post

3 REPLIES 3
v-yangliu-msft
Community Support
Community Support

Hi  @Campolas ,

I created some data:

vyangliumsft_0-1658223248834.png

Here are the steps you can follow:

1. Select two columns – Unpivot Columns.

vyangliumsft_1-1658223248839.png

2. Create calculated column.

Index =
IF(
    'Table'[Value]>='Table'[Target],
RANKX(
    FILTER(ALL('Table'),
    'Table'[KPI]=EARLIER('Table'[KPI])),[Value],,DESC),0)

3. Create measure.

Rank =
SUMX(
    FILTER(ALL('Table'),
    'Table'[Attribute]=MAX('Table'[Attribute])),[Index])

4. Result:

vyangliumsft_2-1658223248839.png

If you need pbix, please click here.

 

Best Regards,

Liu Yang

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

Thnx a lot!!! Sorry bout delay! 

amitchandak
Super User
Super User

@Campolas , see if this can help

You can have like

Switch(selectedvalue([KPI])

"KPI1", Rankx(allselected(Table[seller]), [KP1],

"KPI2", Rankx(allselected(Table[seller]), [KP2],

"KPI3", Rankx(allselected(Table[seller]), [KP3],

"KPI4", Rankx(allselected(Table[seller]), [KP4],

"KPI5", Rankx(allselected(Table[seller]), [KP5] )

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.