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
Hidde
Helper I
Helper I

Count price position in PowerBI

Hi, I am struggling with finding a solution for this:

 

I have a lot of prices per product, so the data looks like this:

 

Product - client - price - Price Position

Product 1 - Client 1 - €2 - 1
Product 1 - Client 2 - €8 - 3
Product 1 - Client 3 - €4 - 2

 

 

So I need to count the position in the ascending order of prices (lowest price = position 1, the best price position) per product. Can this be done in PowerBI?

 

 

1 ACCEPTED SOLUTION
v-xjiin-msft
Solution Sage
Solution Sage

Hi @Hidde,

 

To achieve your requirement, you can try this calculated column:

 

Price Ranking =
RANKX (
    FILTER ( 'Rank', 'Rank'[Product] = EARLIER ( 'Rank'[Product] ) ),
    'Rank'[Price],
    ,
    ASC
)

1.PNG

 

Thanks,
Xi Jin.

View solution in original post

11 REPLIES 11

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.