Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
dafnis14
Specialist
Specialist

Comparing holiday periods

Hi,

I have a request to generate a similar report to the one attached below (Excel).

The idea is to compare a selected holiday period to the same holiday in a previous year.

Another request is to enable the user to define a number of days before and after the holiday period. Which means that the calculations have to be on the fly, and not in script.

I was thinking about using alternate states, but not sure whether this is a good direction.

I would appreciate some guidelines.

  Thanks!

pic.PNG

Message was edited by: Dafnis X

Labels (1)
1 Solution

Accepted Solutions
jpenuliar
Partner - Specialist III
Partner - Specialist III

Hi Dafni,

have a look at attached file using pivot, not exactly as your attached image but nearly there. I only done a define year selection, you can make the current year/previous year dynamic or based on selection.

Have a look at sample / demo files to get an idea how you be able to present Comparison in different ways.

View solution in original post

9 Replies
jpenuliar
Partner - Specialist III
Partner - Specialist III

Hi,

Can you post sample data

dafnis14
Specialist
Specialist
Author

Hi,

I just did..

Thanks!

jpenuliar
Partner - Specialist III
Partner - Specialist III

the attachment is basically the report you want to achieve,

Do you have source data, table/s where the report takes data from?

dafnis14
Specialist
Specialist
Author

Hi Jonathan,

You are right. I should have attached real data. I'll do that later.

But regardless of the holidays – is it possible to generate such a chart at all?

Thanks!

jpenuliar
Partner - Specialist III
Partner - Specialist III

Hi Dafnis,

I believe it is possible, a pivot Table object might do the trick.

dafnis14
Specialist
Specialist
Author

Hi,

I attached a simplified data model.

Thanks!

jpenuliar
Partner - Specialist III
Partner - Specialist III

Hi Dafni,

have a look at attached file using pivot, not exactly as your attached image but nearly there. I only done a define year selection, you can make the current year/previous year dynamic or based on selection.

Have a look at sample / demo files to get an idea how you be able to present Comparison in different ways.

dafnis14
Specialist
Specialist
Author

That's very cool!

Thanks!

I could never think about such a solution..

dafnis14
Specialist
Specialist
Author

Hi Jonathan,

I would appreciate if you could advise regarding a dynamic year option.

For example, if a year is selected, the previous year dates are calculated like that:

Only({<year ={"$(=max(year)-1)"}>}HolidayDate)

I have updated the Sales expression as follows:

Sum({<year ={"$(=max(year)-1)"}>Sales)

but no values are shown...

Can you help me to figure why?

Thanks!