Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am a beginner on QlikView and i would like to do a Month to Day and a Year to day report on QlikView.
To do that i have a table "AsOf", With different data of End of Month and a table "Period" where we can select "YTD" or "MTD".
So when YTD is selected, i would like just the result of the AsOf, but when "MTD" is selected i would like to have the difference between two AsOf Result.
I tried this Expression:
IF( Period = 'YTD',SUM(STE), IF( Period = 'MTD',SUM(STE) - SUM({$< AsOf = {"=$(=Num(AddMonths(Max(AsOf),-1)))"}>} STE)))
but it doesn't work 😕
You can check my sample attached.
Thank you in advance for your help,
Sébastien.
Can you check this:
IF(Period = 'YTD', SUM(STE),
IF(Period = 'MTD', SUM(STE) - Sum(TOTAL {$< AsOF = {"$(='>=' & Num(MonthStart(Max(AsOF),-1)) & '<=' & Num(MonthEnd(Max(AsOF),-1)))"}>} STE)))
UPDATE: You need to be carefully about Upper case and lower case in your file. You used AsOf instead of AsOF
AsOf is not AsOF. Use the exact case sensitive field names
=IF( Period = 'YTD',SUM(STE), IF( Period = 'MTD',SUM(STE) - SUM({$< AsOF = {$(=Num(AddMonths(Max(AsOF),-1)))}>} STE)))