Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am unable to work with filtering data by using yeartodate function, Can any have any suggestion on the same?
I normally add a flag when I am loading my calendar or a table with dates you will want to look at year to date.
LET vDateToday = TODAY();
LOAD
YOURDATE AS DATE,
INYEARTODATE(YOURDATE, $(vDateToday), 0) * -1 AS YTD
FROM YOURCALENDARTABLE;
Now, when you want to use this in an expression you can use an IF statement or set analysis. For example.
IF(YTD = '1', SUM(SOMETHING))
OR
SUM({<YTD = {'1'}>}SOMETHING)