Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi I have a pivot chart and and my issue is Period - P0 value need to add to other Periods
Expr -
sum (Value)
Current Chart
Dim1 Dim2 Dim3 Dim4(Period) : P0 P1 P2 P3
A X TT 10 20 25 40
B Y ZZ 2 5 8 7
And The requirement is:
Dim1 Dim2 Dim3 Dim4(Period) : P0 P1 P2 P3
A X TT 10 30(P0+P1) 35(P0+P2) 50 (P0+P3)
B Y ZZ 2 7 10 9
Note - Dim4(Period) is dragged upwards.
Thank you
Hi Guys,
I got the answer with the help of 'http://community.qlik.com/thread/151035'
and the answer like below -
sum
(Value)
+if(Trad_PERIOD='P0',0,sum(TOTAL <Dim1, Dim2, Dim3> {<PERIOD={'P0'}>} Value))
Thank you all.
Hi Priya,
//initialize a variable for sum of P0 in script and try like this
LET varP0 = Peek('FieldName',0,Temp);
In chart:
if(Product='P0',sum(Value),sum(Value)+$(varP0))
Regards
Neetha
Instead of using Period in Dimension tab... create below 4 expressions in Expression Tab
Expression
SUM({<Period = {'P0'}>}Value)
Lable
P0
Expression
SUM({<Period = {'P0'}>}Value) + SUM({<Period = {'P1'}>}Value)
Label
P1
Expression
SUM({<Period = {'P0'}>}Value) + SUM({<Period = {'P2'}>}Value)
Label
P2
Expression
SUM({<Period = {'P0'}>}Value) + SUM({<Period = {'P3'}>}Value)
Label
P3
Hi Manish,
I have tried it but the issue is, if we select Period(Filter) then for Ex- P1 then still we can see all periods.
Hi,
could you please attached an example qvw?
Hi SunIndia,
Its similar kind of 'http://community.qlik.com/thread/151035'
Hi Guys,
I got the answer with the help of 'http://community.qlik.com/thread/151035'
and the answer like below -
sum
(Value)
+if(Trad_PERIOD='P0',0,sum(TOTAL <Dim1, Dim2, Dim3> {<PERIOD={'P0'}>} Value))
Thank you all.