Forum Discussion
Anonymous
6 years agoNot applicable
Integrate a condition in a VAR Function
Hello everyone, I would like to integrate a IF in the RETURN of a VAR expression. I explain myself, This is my current fonction VAR (without the IF): To Year End =
VAR StartingDate = F...
parry2k
Super User
6 years agoAnonymous try following. also can you share what error message you are getting
To Year End =
VAR StartingDate = FIRSTDATE ( 'Dates'[Date] )
VAR EndingDate = DATE ( YEAR ( StartingDate ), 12, 31 )
RETURN
IF ( DAY( TODAY() ) <= 8,
CALCULATE(
[Projection],
'Dates'[Date] >= StartingDate , 'Dates'[Date] <= EndingDate
)
)Anonymous
6 years agoNot applicable
Hello parry2k ;
There is no error message. The graphic is just empty. I tried your proposition and it does not work. Do you know an alternative.
Thanks you
- parry2k6 years ago
Super User
Anonymous can you share sample pbix file, remove any sensitive information before sharing.