Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear Qlik Community,
I have a code below:
if([Calendar Year] = year(today()),
if([Calendar Year/Month]<today(),
[NET VAVE (Actual)],
[NET VAVE (Forecast)]))
The above code gives the solution for the current year but also returns the previous year's values as empty in the pivot chart.
I want to write a set analysis where I can set the calendar year to the current year.
Can anyone here help me with this?
Best,
A.S
Make sure the format firstly? otherwise below one give some hit to start-up
Sum({<[Calendar Year] ={"=[Calendar Year] <=Year(Today())"}>} [NET VAVE (Actual)])
Dear Anil,
Thanks for the response, but if you will check the statements above, it will include the If clause as well, can you implement it in your code?
Thanks,
Akash
May be explain with sample data?
i dont think we need a sample data, It is a straight forward data and the formula.
Try like below
Instead of [Calendar Year/Month], try with ur calendar date field
Sum({<[Calendar Year] ={"$(=Year(Today()))"},DateField = {"<=$(=Date(Today(),'YourDateFormat'))"}>} [NET VAVE (Actual)])
+
Sum({<[Calendar Year] ={"$(=Year(Today()))"},DateField = {">$(=Date(Today(),'YourDateFormat'))"}>} [NET VAVE (Forecast)])