Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

dafnis14
Contributor III

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

Tags (2)
1 Solution

Accepted Solutions
jpenuliar
Valued Contributor III

Re: Comparing holiday periods

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.

9 Replies
jpenuliar
Valued Contributor III

Re: Comparing holiday periods

Hi,

Can you post sample data

dafnis14
Contributor III

Re: Comparing holiday periods

Hi,

I just did..

Thanks!

jpenuliar
Valued Contributor III

Re: Comparing holiday periods

the attachment is basically the report you want to achieve,

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

dafnis14
Contributor III

Re: Comparing holiday periods

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
Valued Contributor III

Re: Comparing holiday periods

Hi Dafnis,

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

dafnis14
Contributor III

Re: Comparing holiday periods

Hi,

I attached a simplified data model.

Thanks!

jpenuliar
Valued Contributor III

Re: Comparing holiday periods

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
Contributor III

Re: Comparing holiday periods

That's very cool!

Thanks!

I could never think about such a solution..

dafnis14
Contributor III

Re: Comparing holiday periods

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!

Community Browser