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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
DemandMGR
Helper I
Helper I

DAX or Custom Column

I have a large dataset that includes DC#, UPC#, & Sale#.

 

I am trying to identify what the maxsale price is by UPC. I would like a column or a measure that would add to a table that will show the largest sale price for the UPC on every row. All data is in the same table. I have over a million rows here. 

 

I dont really know what to put in the first half of the statement to have it locate the UPC.

 

I think the second part of the statement would be CALCULATE(MAX('TABLE[SALE$] but for the first part would it be VALUES('TABLE[UPC] or maybe FILTER('TABLE[UPC]?

 

I tried MAXX('TABLE[UPC] , CALCULATE(MAX('TABLE[SALES$] and that just gave me the sales price on the row but it didnt give me the Max Sales$ value by UPC.

 

Any help would be greatly appreciated. Thank you in advance. I should add that there are repeat UPCs in each DC and each DC has a differet sale price for the UPC

2 REPLIES 2
Anonymous
Not applicable

Hi @DemandMGR 

Has your problem been solved ? If it has been solved, then please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards,
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

lbendlin
Super User
Super User

Please provide sanitized sample data that fully covers your issue. If you paste the data into a table in your post or use one of the file services it will be easier to work with. Please show the expected outcome.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

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

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.