Forum Discussion
Colour filter day
Hi,
Based on a previous post of me (Click), I want to give the days in the past a colour. How can I do that? Is that possible in Power BI?
Thanks!
Hi,
After my test, i think you should not add other check measure into original measure because the merged measure will apply all conditions that you defined.
See this, as below shows, the [Date] and [Percentage] both apply two conditions in switch function.
Measure = SWITCH ( TRUE (), MAX ( 'Table'[Date] ) < TODAY (), "#FF0000", MAX ( 'Table'[Percentage] ) > 0.8, "#dd7c19" )So i advise you create two color measures in this case and apply them to two fields.
Like this:
Color_1 = IF(MAX('Table'[Date])<TODAY(),"#FF0000") Color_2 = IF(MAX('Table'[Percentage])>0.8,"#dd7c19")See my attached pbix file.
Best Regards,
Giotto
13 Replies
- amitchandakSuper User
Anonymous , you can create a color measure like this (using switch true() or if )
Color Date = if(FIRSTNONBLANK(Table[date],TODAY()) <today(),"lightgreen","red")
And in conditional formatting choose "field" option and use this measure.
Refer :
https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-numbers-in-the-column
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting- AnonymousNot applicable
amitchandak Im not able to choose this measure. I can choose other measure which I created but this one is not possible to choose.
- amitchandakSuper User
Anonymous , as long you create the new one as a measure you should able to do that.