Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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

12 Replies
Anonymous
Not applicable
Author

Hi Giulio,

May i know what condition fulfilled your requirement. Still i am nor clear with the answer.

Regards,

Sada

Anonymous
Not applicable
Author

Hi Sada,

sure, I don't know what your issue with your dataset is, but my one was solved by loading the fact table and making a left join with the Launch date table in the load script. In the front end: I have applied an IF function at the dimension product:

if(

   (Date>=[Launch Date]) and(Date<= [Launch Date] + 6),

   [Product]

   )

and as a measures just sum(Revenue), and the date: date([Launch Date]) and date([Launch Date]+6)

is that clear and suits also your case?

I already knew that this was a possible solution I just was looking for a more performant one with Set Analysis but as Michael has explained is not possible in this case

tell me if something is not clear,

Giulio

Anonymous
Not applicable
Author

It's working for me. Thanks a lot.