Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
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 every month) and the matrix displays those values in columns by forecasted month using my Date table. I would like to be able to highlight the last value updated from that month but I can not wrap my head around the logic to apply in a dax formula.
Solved! Go to Solution.
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
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
__Result
@JanaeWalker864 Tough to be exact since I have no idea about your table and column names. But maybe something like:
Measure Conditional Format =
VAR __ForecastMonth = MAX('Forecast'[MonthYear])
VAR __Date = MAX( 'Dates'[Date] )
VAR __MaxDate = MAXX ( FILTER( ALL( 'Dates' ), [MonthYear] = __ForecastMonth ), [Date] )
VAR __Result = IF( __Date = __MaxDate, 1, 0 )
RETURN
__Result
You can then create a conditional formatting rule based on this measure where 1 is the last date in each forecast month.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
16 | |
5 | |
2 | |
1 | |
1 |
User | Count |
---|---|
14 | |
6 | |
5 | |
3 | |
2 |