Forum Discussion
conditional formating for weekends in the matrix visual
- 6 years ago
Anonymous , Create a measure like this checking the weekday value
if(FIRSTNONBLANK(Table[Value],"true") = "true","green","red")
or
if(FIRSTNONBLANK(Table[Weekday],"AnyDay") in {"sun","sat"},"green","red")
And the in conditional formatting use field option with this measure
Steps :
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#color-by-color-values - Anonymous6 years ago
HI Anonymous,
You can use below measure formula to add a measure and setting condition formation on your value field based on measure result:
Measure = VAR currDay = MAX ( 'Table'[Day] ) VAR currDate = DATEVALUE ( currDay & "-" & MAX ( 'Table'[Month] ) ) RETURN IF ( WEEKDAY ( currDate, 2 ) > 5, "Blue", "Black" )Since I'm not so sure your table structure, can you please share some dummy data with a similar datas tucute and visual design to help us clarify your scenario?
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
HI Anonymous,
You can use below measure formula to add a measure and setting condition formation on your value field based on measure result:
Measure =
VAR currDay =
MAX ( 'Table'[Day] )
VAR currDate =
DATEVALUE ( currDay & "-" & MAX ( 'Table'[Month] ) )
RETURN
IF ( WEEKDAY ( currDate, 2 ) > 5, "Blue", "Black" )
Since I'm not so sure your table structure, can you please share some dummy data with a similar datas tucute and visual design to help us clarify your scenario?
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng