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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
soha1902
Creator
Creator

Pivot Table

Hi All,

I have following Data:

ProdIDProductActivatedDeactivated
1Prod A02/15/13
2Prod B08/05/13
3Prod C01/07/14
1Prod A02/10/14
2Prod B02/26/14
1Prod A11/15/14

Now my requirement is, if any Product is active then its price will be display as 10 and if it is deactive then its price will be 0.

For example Prod A is activated on 15 feb 2013 and deactivated on 10 Feb 2014 so from 15th Feb 2013 till 10Feb 2014 its price will be 10. On 10th Feb 2014 Prod A was deactivated and on 15 Nov2014 again got activated so from 10th Feb 2014 to 15 Nov 2014 its price will be 0.

I need to add Price column as a expression and Week column should be pivoted.

Can any one suggest me, how to implement this.

The resultant table shold look like this for Product A

ProdIDProductActivatedDeactivated2/18/20142/25/2014-------------'2/7/20142/14/20142/21/2014-------------'11/14/201411/21/2014till cureent date
1Prod A02/15/131010100001010
2Prod B08/05/13
3Prod C01/07/14
1Prod A02/10/14
2Prod B02/26/14
1Prod A11/15/14

Thanks in advance.

11 Replies
soha1902
Creator
Creator
Author

Thanks a lot liron....

soha1902
Creator
Creator
Author

Hi Liron,

I have one requirement....if you have some time can you please suggest me abt following:

http://community.qlik.com/thread/151216

Thanks.