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

How to get price comparison report

Dear All,

 

I have a price list from 4 suppliers. 

 

siroopm2020_0-1658735926106.png

 



I want to get the minimum unit price and respective supplier name and the second minimum unit price and respective supplier name as below.

 

siroopm2020_1-1658735926103.png

 

 

1 ACCEPTED SOLUTION

hello ! 

 

you should create calculation column 

SolomonovAnton_0-1658740255041.png

 

in visual table you should in Filter Panel  apply filter RanlColumn = 1 for get Lowest Price 

SolomonovAnton_1-1658740374390.png

in visual table you should in Filter Panel  apply filter RanlColumn = 2 for get Second Price 

SolomonovAnton_2-1658740427677.png

 

if I answered at your question please mark topic as resolved 🙂

 

 

View solution in original post

6 REPLIES 6
amitchandak
Super User
Super User

@siroopm2020 ,

Unpivot the table in the power query, and then you can create rank for price.

You will have two columns, rename them as Supplier and price

 

Then create a rank like this

 

 

Rank = rankx(filter(Table, [supplier] =earlier([supplier]) && [Product Name] =earlier([Product Name]) ) , [Price],,asc,dense)

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

hello ! 

 

you should create calculation column 

SolomonovAnton_0-1658740255041.png

 

in visual table you should in Filter Panel  apply filter RanlColumn = 1 for get Lowest Price 

SolomonovAnton_1-1658740374390.png

in visual table you should in Filter Panel  apply filter RanlColumn = 2 for get Second Price 

SolomonovAnton_2-1658740427677.png

 

if I answered at your question please mark topic as resolved 🙂

 

 

how to avoid zero values columns while ranking?

 

Some results are wrong. Barcode 1889648 lowest must be 68, and second lowest 77.40

 

i corrected it, caz Data Type was text. Now its okey. Thank you. 

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.