Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI all,
i want one analysis Current year Vs Previous Year but in this i want suppose CY i having 4 month as Per Fiscal Year Apr,May,Jun,July 2015,
Now i want PY should contain Same Four month which as Current Year, Not Full year..
How i can do this??
please suggest
What you are describing, is called Current Year-To-Date vs. Prior Year-To-Date.
The function in QlikView and Qlik Sense that calculates that, is called InYearToDate(). It's common to pre-calculate YTD flags (simple 1/0 fields) for all Calendar dates, and to use the YTD flags in all chart expressions that require this logic.
I'm describing these techniques in a lot of detail in my new book QlikView Your Business, which is now featured on Qlik Market - check it out!
cheers,
Oleg Troyansky
QlikView Your Business: An expert guide to Business Discovery with QlikView and Qlik Sense
Hey Any one Here who can help me in this??
thanks in Advance
Do u have date field in your app ...
Create 2 Variables:
vmax= date(addyears(max(Date), -0))
vmax1= date(addyears(max(Date), -1))
And Now Your expression will be :
PreYear:
=sum({<Year={'$(=max(Year)-1)'},Date={'<=$(vmax1)'},Month>}Value)
CurrYear:
=sum({<Year={'$(=max(Year))'},Date={'<=$(vmax)'},Month>}Value)
yes
Sum({<Fiscal Year = {'$(=Max(Year))'} >}Sales) for YTD
Sum({<Fiscal Year = {'$(=Max([Year]-1))'} >}Sales) for PYTD but it is giving me 12 month sales i want watever CY Month has been covered i.e. suppose for fiscal year 2015-2016 month Covered are Apr,May,Jun,July....
i want PYTD shud give Apr,May,Jun,July Sales while comparing.
thanks
Abhay
Check the above expressions creating two variables.
Let me know if u have any issues.
Hi,
Try this expressions
Current Year:
Sum({<Year=, FiscalYear=, Month=, Quarter=, DateFieldName={'>=$(=YearStart(Today(), 0, 4))<=$(=Today())'}>} Sales)
Current Year:
Sum({<Year=, FiscalYear=, Month=, Quarter=, DateFieldName={'>=$(=YearStart(Today(), -1, 4))<=$(=YearEnd(Today(), -1, 4))'}>} Sales)
Replace Year, FiscalYear, Month, Quarter and DateFieldName with your actual field names.
Hope this helps you.
Regards,
Jagan.
Nice explanation. Thank you for answer.