Forum Discussion
PChmurzynski
2 years agoFrequent Visitor
Omitting nulls/blanks in a Conditional Formatting Measure
I have a table visual with a a Date/Time Column which has some null values. I've effectively applied conditional formatting to that visual by utilising a switch measure. The problem is I'm getting "e...
- 2 years ago
I have solved it. It's very emberrassing. The problem was I was refferring to a different column in the measure than I wanted to apply the conditional formatting to. Bothe measures in the question will work just fine as long as we change the column name. The correct Measure looks like this:
DateStatus = VAR TodayDate = TODAY() VAR ApptDate = MAX('factPropertiesRemAppts'[RemJobdtmAppt]) RETURN SWITCH( TRUE(), ISBLANK(ApptDate), BLANK(), -- Leave blank if there is no date ApptDate > TodayDate, "Green", ApptDate = TodayDate, "Yellow", ApptDate < TodayDate, "Red" )
ray_aramburo
2 years agoSuper User
Try using a Date field and not a Date/Time Field as input for the MAX value. Your measure works as expected. See example attached.