Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi expert,
I am new to Qlik, now I tried to use the date range picker to let the user select date period of current year and I want to calculate the sales volume comparison between last year and this year. can somebody tell me how to do it? thanks.
Hi,
use addYears() in set analysis
use set analysis for that. try below
Sum({<date={">=$(=date(AddYears(min(date_field),-1)))<=$(=date(AddYears(max(date_field),-1)))"}>}Sales)
Regards,
Prashant Sangle
just bring more background information. Let's say when the user picks the time period for examples 03/01/2020 ~04/15/2020, then I want to calculate the sales amount during the same time period of 2020 and 2019. my question is how to get user input and how to convert it to the 2019 time period.
Can anybody help me out? Thanks.
Michael
Can you share a little data or an example of your app?
Hi,
use addYears() in set analysis
use set analysis for that. try below
Sum({<date={">=$(=date(AddYears(min(date_field),-1)))<=$(=date(AddYears(max(date_field),-1)))"}>}Sales)
Regards,
Prashant Sangle
thank you @PrashantSangle