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 August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Callout min and max of an averagex measure

I have a measure which calculates the average difference in a projects promise date and actual completion date. The goal is to have a card visual in my report that calls out the project type that has the highest average and the project with the lowest average.

 

With my current measure I can put it in a table with project type to get the average for all project types, and do some conditional formatting to highlight the highest and lowest, but I would like to be able to place a card with just those two values. Is there a way to write this functionality into the measure?

 

For reference, [Time Promised] and [Time Delivered] are measures which calculate the difference b/w start date and promise date, and start date and actual done date. 

 

Thank you in advance.

 

AverageTimeDiff =
CALCULATE(
    AVERAGEX(Projects, [Time Promised] - [Time Delivered]
    ),
    Projects[PromiseDate] <> BLANK()
)
7 REPLIES 7
Anonymous
Not applicable

I don't think this works because I want the Min/Max of the average of each project type. This gives me Min/Max of the difference for each row (each individual project.) 

Hi @Anonymous 

please tag the person you are referring to his response. Not sure if here you're referring to my response or to @amitchandak's

Anonymous
Not applicable

Apologies, I thought I was replying to @amitchandak's post, this comment was a reply to him. I will try your solution a little later today, thanks for the assistance.

tamerj1
Super User
Super User

Hi @Anonymous 

please try

Longest Duration Project =
MAXX (
TOPN (
1,
ADDCOLUMNS ( VALUES ( Projects[Project Name] ), "@Duration", [AverageTimeDiff] ),
[@Duration]
),
Projects[Project Name]
)

Anonymous
Not applicable

Thanks for the response. This is not quite what I'm looking for, it returns the single project which was most over the deadline. 

 

I want to return the Max of the average for each type. In the image below, each project type has the averagetimediff displayed, so the Max project type would be Custom Software - Support & Evolve (352) and the Min project type would be Marketing - Marketing Plan (-135).  

 

eloomis_1-1672840579604.png

 

 

Hi @Anonymous 

would you please share a screenshot of the measure code and the results that you are obtaining?

amitchandak
Super User
Super User

@Anonymous , Try min/max value like

 

CALCULATE(
MINX(Projects, [Time Promised] - [Time Delivered]
),
Projects[PromiseDate] <> BLANK()
)

 

 

CALCULATE(
MAXX(Projects, [Time Promised] - [Time Delivered]
),
Projects[PromiseDate] <> BLANK()
)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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.