Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team,
I am struggling to find the solution for below YTD scenario based on the Fiscal year.
My requirement is :
I have a global filter of calendar date
If user selects a date between Jan 2019 to Dec 2019 the data should be accumulate from April 2019 to Dec 2019
If user selects a date between Jan 2019 to July 2020the data should be accumulate from April 2020 to July 2020.
The above scenarios is working fine for me by applyling below expression but where I am getting issue is
If I select April 2019 to Jan 31st 2020 In this case the values is getting doubled. I confused Where I am getting wrong.
can anyone help me is there anything I can change from below expression to get solution for my issue
if(Year=Year(max(CalendarDate)) and Year=Year(Min(CalendarDate)),
SUM({<CalendarDate={"<=$(=date(max(CalendarDate),'DD/MM/YYYY'))>=$(=date(min(CalendarDate),'DD/MM/YYYY'))"},Type={'product'}>} sales),
SUM({<CalendarDate={"<=$(=date(max(CalendarDate),'DD/MM/YYYY'))>=$(=Date(addmonths(yearstart(max(CalendarDate)),3),'DD/MM/YYYY'))"} , Type={'Sales'}>} sales))
Thanks,
Chinnu
Here is potentially another way to go at things, see the following Design Blog post:
https://community.qlik.com/t5/Qlik-Design-Blog/Fiscal-Year/ba-p/1472103
Here is one on Set Analysis as well:
https://community.qlik.com/t5/Qlik-Design-Blog/A-Primer-on-Set-Analysis/ba-p/1468344
Hopefully those may help you get things sorted out.
Regards,
Brett