Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

giulioandrea
New Contributor III

Set Analysis on different time period in the same table

Hi All,

I am facing the following problem:

I have different products in my dataset with different launch date for instance:

ProductLaunch Date
Bread03/06/2017
Pasta14/06/2017
Biscuit23/06/2017
Pizza04/07/2017

Now I want to start some analysis by putting in the same table each product and comparing the performance of products in their first 7 days. I am able to perform a set analysis just on fixed interval of time (i.e. with a set analysis on YearWeek field) but not in this case where I just want to compare the performance of products in their first 7 days. I have tried with loading the above table and by making a P() set analysis in the field "Date", but seems not working.

Attached are some test-Data.

the following table (based on the attached test Data) is my target to reproduce in Qlik:

  

Launch DateRevenue
Bread03/06/2017280.5
Pasta14/06/2017201
Biscuit23/06/2017114
Pizza04/07/2017816.5


Any help would be really appreciated,

thanks in advance.

Giulio

1 Solution

Accepted Solutions
mov
Esteemed Contributor III

Re: Set Analysis on different time period in the same table

Well, you don't have a choice.  It is not a place where you can use set.  Speaking of performance - your if() expressions will be simple, they are not doing to make any noticeable impact.

12 Replies
beck110979
Valued Contributor III

Re: Set Analysis on different time period in the same table

Hi Giulio,

look at this: Set Analysis for certain Point in Time

i hope that helps

Beck

giulioandrea
New Contributor III

Re: Set Analysis on different time period in the same table

Hi beck,

thanks for your reply, unfortunately, this URL doesn't fit my requirement! I am perfectly able to make any set analysis with fixed period of time in the same table. Here I am asking another question, I want to compare in the same table the first week after the Launch date so it is not a fixed range of time.

Thanks,

Giulio

beck110979
Valued Contributor III

Re: Set Analysis on different time period in the same table

ok, i see your point, i try to create an example and will post it to you

Beck

sadasiva
Contributor

Re: Set Analysis on different time period in the same table

Hi Team,

I am also facing same kind of challenge.

Re: Promotion event wise Data - last 'n' Days

Please help us.

antoniotiman
Honored Contributor III

Re: Set Analysis on different time period in the same table

Hi Giulio,

like this

Regards,

Antonio

mov
Esteemed Contributor III

Re: Set Analysis on different time period in the same table

It's not for set analysis - sets are evaluated over the whole data set,not per table row.  You can implement it using if() function without any problems.

giulioandrea
New Contributor III

Re: Set Analysis on different time period in the same table

Hi Antonio,

thanks for your reply,

Apologize I was no clear.. I need the performance during the first 7 days since the product was launched.

I have updated the post. BTW follows the tables that I want to reproduce in Qlik.

Capture.JPG

Thanks again.

giulioandrea
New Contributor III

Re: Set Analysis on different time period in the same table

Hi Michael,

Thanks for your reply.

This is was what I was thinking, I was believing that with some tricks by using the P() function in the set analysis could be possible.

BTW I really want to avoid if statement when possible for performance reason, do you think that one IF like this could not generate problems?

mov
Esteemed Contributor III

Re: Set Analysis on different time period in the same table

Well, you don't have a choice.  It is not a place where you can use set.  Speaking of performance - your if() expressions will be simple, they are not doing to make any noticeable impact.