Forum Discussion
JanaeWalker864
3 years agoFrequent Visitor
Dax Conditional Formatting to Highlight Last Value
This is an illustration of a forecast. Forecast as of date which comes from my historical forecast table represents the date in which a forecast was updated(In this case the forecast is updated...
- 3 years ago
Measure Conditional Format = VAR __ForecastMonth = MAX('Historical Forecast'[Forecast As Of Date]) VAR __Date = MAX( 'Date'[Date] ) VAR __MaxDate = MAXX ( FILTER( ALL( 'Date' ), 'Historical Forecast'[Forecast as of Date] = __ForecastMonth ), [Date] ) VAR __Result = IF( __Date = __MaxDate, 1, 0 ) RETURN __Result
JanaeWalker864
3 years agoFrequent Visitor
This is what I compliled however, I received this error message
Measure Conditional Format =
VAR __ForecastMonth = MAX('Historical Forecast'[Forecast As Of Date])
VAR __Date = MAX( 'Date'[Date] )
VAR __MaxDate = MAXX ( FILTER( ALL( 'Date' ), 'Historical Forecast'[Forecast as of Date] = __ForecastMonth ), [Date] )
VAR __Result = IF( __Date = __MaxDate, 1, 0 )
RETURN
MAXX('Historical Forecast', __Result)
A single value for column 'Forecast as of Date' in table 'Historical Forecast' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to a single unit
Greg_Deckler
3 years agoCommunity Champion
Measure Conditional Format =
VAR __ForecastMonth = MAX('Historical Forecast'[Forecast As Of Date])
VAR __Date = MAX( 'Date'[Date] )
VAR __MaxDate = MAXX ( FILTER( ALL( 'Date' ), 'Historical Forecast'[Forecast as of Date] = __ForecastMonth ), [Date] )
VAR __Result = IF( __Date = __MaxDate, 1, 0 )
RETURN
__Result