Forum Discussion
Chorizo
5 years agoFrequent Visitor
Conditional column/measure based on date
Hi all, I have a table with daily performance and estimate data as shown below: Date Actual Short Term Estimate Long Term Estimate 01/06/21 0.2 0.3 0.33 ...
amitchandak
5 years agoSuper User
Chorizo , Based on what I got, Try like
Measure =
var _max = maxx(allselected('Calendar'), 'Calendar'[Date])
return
Switch( true() ,
month(_max) = 9 , Table2[Date] > _max && Table2[Date] <= date(Year(_max),12,31) , [ Short term estimate]
Table2[Date] <= _max , [Actual Value] ,
Table2[Date] > _max && Table2[Date] <= eomonth(_max,0),[Short Term Estimate] ,
Table2[Date] > eomonth(_max,0) && Table2[Date] <= eomonth(_max,3) ,[Short Term Estimate] ,
[Long Term Estimate]
)