Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
aliafshari
Contributor

pivottable expression

Hi

I have a problem with pivot table expression, my table is something like this:

 

ItemNumber101_Q101_A102_Q102_ATotal_QTotal_A104_Q104_A201_Q201_A202_Q202_A203_Q203_A
A100111112823193030120130
A1011312131326251104020110
A10223294126012060120
A10371091216221408015020

Ive used CrossTable I would like to calculate 201_A , 202_A and 203_A based on below formula:

201_A=201_Q * (Total_A / Total_Q) abd so on.

my qv file is attached, how can i do that?

Tags (1)
1 Solution

Accepted Solutions

Re: pivottable expression

Check the attached

Capture.PNG

18 Replies

Re: pivottable expression

What would be the calculation for 202_A and 203_A?

aliafshari
Contributor

Re: pivottable expression

Hi Sunny Talwar

202_A= 202_Q * (Total_A / Total_Q)

203_A =203_Q * (Total_A / Total_Q)

Re: pivottable expression

Are you open to some script changes? not too complicated... just adding a new field which will store the number before '_' in the itemnumber field

aliafshari
Contributor

Re: pivottable expression

sorry can you look at my qv file and share it, thanks.

Re: pivottable expression

I can, all I am saying is that are you okay with making script changes?

aliafshari
Contributor

Re: pivottable expression

yes I can

Re: pivottable expression

Check the attached

Capture.PNG

aliafshari
Contributor

Re: pivottable expression

sorry could you send the qv file. thank you so much

aliafshari
Contributor

Re: pivottable expression

wow what a wonderful solution. thank you so much