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

Get Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.

Reply
Anonymous
Not applicable

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
Anonymous
Not applicable

Hi  @Anonymous ,

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
Anonymous
Not applicable

Hi  @Anonymous ,

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

Anonymous
Not applicable

Thnx a lot!!! Sorry bout delay! 

amitchandak
Super User
Super User

@Anonymous , 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] )

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors