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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
fahadarshad
Helper I
Helper I

Calculating the maximum value of a measure over time

Hello everyone

 

I have a calculated measure for audience over time.

Audience = CALCULATE(SUM(Timings[Audience on Minute]),filter(ALLSELECTED(timings),Timings[Time Value]<=Max(Timings[Time Value])))
 
When I plot the visualisation I get the measure over time.
But I want to know at what time was the maximum value of the measure achieved and what value was it?
Appreciate your help
Untitled.png
1 ACCEPTED SOLUTION

@fahadarshad  You can use this approach, not sure if it fits your use case, I used some mock data.

 

1. Create a calculated table as follows:

AudienceSummary = SUMMARIZE(Timings, Timings[Time Value], "Audence Level", [Audience])
 
2. Create these two measures in this new table:
(a) Max Audience = MAX(AudienceSummary[Audence Level])
 
(b) Max Audience Time =
VAR maxaudience = [Max Audience]
RETURN CALCULATE(MAX(AudienceSummary[Time Value]), AudienceSummary[Audence Level]=maxaudience)
 
A picture of how it turned out on my desktop below.
PBI Help timings.PNG

View solution in original post

4 REPLIES 4
sanimesa
Post Prodigy
Post Prodigy

@fahadarshad  There is already an answered topic that seems to be what you are after:

https://community.powerbi.com/t5/Desktop/Obtain-the-maximum-value-of-a-Measure/m-p/856422

Thanks.

But there is also the requirement of wanting to know at what time the maximum value occured.

@fahadarshad  Were you able to try my solution or did you use some other method? I'd be curious to know.

My solution for both max value of the measure and the time the max value occurs is here:

https://community.powerbi.com/t5/Desktop/Calculating-the-maximum-value-of-a-measure-over-time/m-p/10...

@fahadarshad  You can use this approach, not sure if it fits your use case, I used some mock data.

 

1. Create a calculated table as follows:

AudienceSummary = SUMMARIZE(Timings, Timings[Time Value], "Audence Level", [Audience])
 
2. Create these two measures in this new table:
(a) Max Audience = MAX(AudienceSummary[Audence Level])
 
(b) Max Audience Time =
VAR maxaudience = [Max Audience]
RETURN CALCULATE(MAX(AudienceSummary[Time Value]), AudienceSummary[Audence Level]=maxaudience)
 
A picture of how it turned out on my desktop below.
PBI Help timings.PNG

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors