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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Migscruz
Helper I
Helper I

How to compare prices of different products that are on on the same table

Hi!


A few weeks ago i tried to do a comparative of prices between the Price of Product 1 - Price of Product 2 and so on just as this that i have in PBI: https://we.tl/t-oa918LfP2M

I tried to do the same with this Database: https://we.tl/t-KFuaINVdM6 that is larger but it doesn't work i don't know why. I think the problem is with de lookupvalue because theres a lot of products that have different prices depending on the banner and the date. 

 

It should work exactly as this PBI File https://we.tl/t-oa918LfP2M but with this new database https://we.tl/t-KFuaINVdM6

 

Hope u can help me please.

 

Thanks! 🙂

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

Hi @Migscruz ,

 

Please try the following formula:

 

Name Table = 
SUMMARIZE (
    Sheet1,
    Sheet1[Name],
    Sheet1[Category],
    "price", SUM ( Sheet1[Average Price] )
)
Index Table = 
SUMMARIZE (
    Sheet1,
    Sheet1[Name],
    Sheet1[Category],
    "price", SUM ( Sheet1[Average Price] )
)
Banner Table = 
GROUPBY ( Sheet1, Sheet1[Name], Sheet1[Category] )

vkkfmsft_0-1631517248309.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,
Winniz

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

2 REPLIES 2
v-kkf-msft
Community Support
Community Support

Hi @Migscruz ,

 

Please try the following formula:

 

Name Table = 
SUMMARIZE (
    Sheet1,
    Sheet1[Name],
    Sheet1[Category],
    "price", SUM ( Sheet1[Average Price] )
)
Index Table = 
SUMMARIZE (
    Sheet1,
    Sheet1[Name],
    Sheet1[Category],
    "price", SUM ( Sheet1[Average Price] )
)
Banner Table = 
GROUPBY ( Sheet1, Sheet1[Name], Sheet1[Category] )

vkkfmsft_0-1631517248309.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,
Winniz

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

 

sm_talha
Resolver II
Resolver II

In the original file you have one price for one product, so you were able to compare prices of two different products and the lookup function was also working fine because it had to look for one price for a product. 

In the new database you have several prices for one product, so now lookup function is failing because it is finding more than one price for a single item.

you can add custom ID to your table and try to do your calculations based on those IDs instead of names. 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.