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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Super User
Super User

So what is the rule that it should be highlighted?


@ 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!:
The Definitive Guide to Power Query (M)

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors