Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good morning all,
I need help to perform a calculation.
I would like to calculate the number of contracts at the end of the period - max (date) - in dimension and compare it with the same period of the previous year.
Currently, I have a graph for each period (customer request): Year, Semester, quarters, Month, Week, Dayss.
If I select the year 2020, I will automatically have the data of the years, Semetres, quarters, months, weeks and days of the years 2019 and 2020.
My calculation for the current period is:
SUM ({<DATE_CODE = {$ (vEndFilterDate)}>} CONTRACT_COUNT)
with
vEndFilterDate = max (DATE_CODE)
it seems to me to work when I change year, month and the others for 2020.
Each time I have to find the max date of the period and calculate the number of contracts on that date.
But I cannot automate the calculation for the periods of the previous year.
How to do this ?
Thank you a lot
Have a look at the following Design Blog posts, hopefully one of them will help on this:
https://community.qlik.com/t5/Qlik-Design-Blog/Dates-in-Set-Analysis/ba-p/1472511
https://community.qlik.com/t5/Qlik-Design-Blog/Set-Analysis-in-the-Aggr-function/ba-p/1463822
Here is the base URL in case you want to search further on your own as there are some further Set Analysis posts, but the two above were most applicable I think.
https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog
Regards,
Brett
Please share the sample data and expected output to help in this.