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

How to add a column with the most expensive part for each product

I have a list of products, their parts and the price of the parts. The data looks like this:

ProductPart NumberPrice
AA1785
AA1797
AA17210
BB1605
BB1659

 

 

I have another query with the list of products and I want to add a column for the most expensive part for each product. It would look like this:

 

ProductMost Expensive Part NumberMost Expensive Part Price
AA17210
BB1659
1 REPLY 1
v-yuta-msft
Community Support
Community Support

Hi ateebagy,

 

Create a calculate column using DAX like below:

Most Expensive Part Price =
CALCULATE (
MAX ( Table1[Price] ),
FILTER ( Table1, Table1[Product] = EARLIER ( Table1[Product] ) )
)

捕获.PNG  

 

Then you can create a table chart and create a slicer chart as below to achieve your requirement:

1.PNG

 

Regards,

Jimmy Tao

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.