Forum Discussion
Dynamic latest load variable for Full Year forecast
- Anonymous3 years ago
Figured it out! changed the latest_forecast variable to match the load date quarter -1 selected value on the slicer and added the extra filter within the CALCULATE
Anonymous , With help from a date table, try measure like
Actual +forecast =
var _max = if(isfiltered('Date'),MAX( 'Date'[Date]) , today())
var _min = eomonth(_max,-1*MONTH(_max))+1
var _YED = eomonth(_max,12-1*MONTH(_max))
return
CALCULATE(Sum(Table[Amount]), filter(Table, [Type] = "Actual") ,DATESBETWEEN('Date'[Date],_min,_max)) +
CALCULATE(Sum(Table[Amount]), filter(Table, [Type] = "Forecast") ,DATESBETWEEN('Date'[Date],_max+1,_YED))
Maybe I'm missing something but I feel like that measure filters on the right dates but doesn't take in consideration the multiple forecast loads. How does it know which load date to use?
If I select to view data from Q1 it should use the Apr-1 loaddate but if I select Q2 it should be using the Jul-1 loaddate (and so on and so forth)