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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
JKPBI
Frequent Visitor

All Time High and Low based on multiple Fields and Date

Hello all:

 

I am trying to figure out how to get an ATH measure based on a couple of fields. BAsiclaly the data is structured like below (with many other columns, but not of concern), and I'd like to get measures that produce the ATH or ATL. 

 

I'll likely have some filters going on for Set, in case that makes a difference.

 

EDIT: as additional info: What I'm looking for it to do is compare the Totals for each date and then return which of those was highest. It would therefor have to SUM up the totals by Date for all different Variety (per each date) and then return whichever one was highest.

 

So would SUM Green, Red, and Blue for 1/5/2022 and compare to the SUM of Green, Red, and Blue for 2/5/2022.

 

SetVarietyDateTotal
Set 1Green1/5/2022 $  100.00
Set 1Green2/5/2022 $  110.00
Set 1Green3/5/2022 $    90.00
Set 1Red1/5/2022 $    20.00
Set 1Red2/5/2022 $    10.00
Set 1Red3/5/2022 $       5.00
Set 1Blue1/5/2022 $  800.00
Set 1Blue2/5/2022 $  950.00
Set 1Blue3/5/2022 $  700.00

 

Set 1 ATH $  1,070.00
Set 1 ATH Date2/5/2022
  
Set 1 ATL $     795.00
Set 1 ATL3/5/2022

 

Thank you to anyone that gives advice, I appreciate it

3 REPLIES 3
SpartaBI
Community Champion
Community Champion

@JKPBI maybe more info is required in case total is a column in your table then try this:
Set 1 ATH = CALCULATE(MAX('Table'[Total]), REMOVEFILTER('Table'), VALUES('Table'[Set])
Set 1 ATL = CALCULATE(MIN('Table'[Total]), REMOVEFILTER('Table'), VALUES('Table'[Set])


2022-05-19 17_30_22-Re_ Need help on DAX function with measure vs colu... - Microsoft Power BI Commu.png

Showcase Report – Contoso By SpartaBI


SpartaBI_3-1652115470761.png   SpartaBI_1-1652115142093.png   SpartaBI_2-1652115154505.png

Full-Logo11.png

@SpartaBI 

 

Thank you for the response. I think I can provide some extra information:

 

What I'm looking for it to do is compare the Totals for each date and then return which of those was highest.

 

It would therefor have to SUM up the totals by Date for all different Variety (per each date) and then return whichever one was highest.

 

So would SUM Green, Red, and Blue for 1/5/2022 and compare to the SUM of Green, Red, and Blue for 2/5/2022.

 

SpartaBI
Community Champion
Community Champion

@JKPBI I will PM you

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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