Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago

Conditional Formating on Aggregated Time Value

Hello!

I'm fairly new to DAX and Power BI and need your advice on the issue that I'm facing.

 

I'm trying to apply conditional formatting to my aggregated talktime.

My measure: Talktime_Sum = Sum(AllCombine[Talktime])

 

 

I'm trying to put them to three colours:

- < 1:30:00 it will be Red

- > 1:30:00 and < 2:00:00 it will be Amber

- > 2:00:00 it will be green

 

I have tried using this method whereby I create a colour measure first and then use conditional formatting with field value option on it but the first step doesn't seem to be working for me.

 
Colour = SWITCH( TRUE (),
SUM(AllCombine[Talktime]) < TIME(01,30,00), "Red",
SUM(AllCombine[Talktime]) > TIME(01,30,00) && SUM(AllCombine[Talktime]) < TIME(02,00,00), "Amber",
"Green"
)

 

 

 

My result:

Thanks in advance!

1 Reply

  • Hi Anonymous,
    Yes, the first solution wouldn't work, because there is no such field in conditional formatting which describe time filed, so I don't think it's possible right now.
    Thanks!