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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Anonymous
Not applicable

Dax - Conditional Fomatting

Hello people,

 

I have doubts about how to create a dax function that changes only with month \ year, to highlight in the table only the tickets that were above the average month \ year.

 

In this screen printed below, the month of March had three tickets resolved that totaled 25.95 days and an average of 8.65 days per ticket.

 

Img.png

 

In the table, only the 1st ticket lasting 12.21 days should be colored.

 

Is there a way to do this?

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi Greg, the rule would be:

IF (Duration (Days) > Average of Duration (Days), "Red", "Green")

View solution in original post

4 REPLIES 4
Greg_Deckler
Community Champion
Community Champion

So what is the rule that it should be highlighted?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Hi Greg, the rule would be:

IF (Duration (Days) > Average of Duration (Days), "Red", "Green")

Anonymous
Not applicable

Hi there.

 

Here's your solution. Please adjust it to your needs.

Conditional Formatting based on Monthly AvgConditional Formatting based on Monthly Avg

Here's the file:

 

https://1drv.ms/u/s!ApyQEauTSLtOgYM_8lY01MNux79mvw?e=LOxfiX

 

Best

D

Anonymous
Not applicable

 

Thank you very much @Anonymous,

 

That was exactly what I was needing.

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.