Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I made a pivot table like below (without the yellow column)
Now I want add the yellow column which value is the difference between last two month (in this case,201404 and 201403) to the right of the pivot.
Can Qlikview do this?
Thank you very much for your help.
Best regards
Wei
Add a new expression that computes what you need
Hi
You can use the above function, see attached qvw for an example
Regards
Richard
QlikCentral.com
Hi,
Try using SecondaryDimensionality , attached is the qvd.
Thanks & Regards,
MVV Satish.
Yes you can add its depends on your expression
like
201404 - 201403 = diff
in another column
COLUMN(2)-COLUMN(1) WILL GIVE THE DIFFERENCE IF U WANT THE COLOR MEAN FOR THE DIFFERENCE ROM MEAN U HAVE TO GIVE IN EXPRESSION BACKGROUND
IF(COLUMN(2)-COLUMN(1)>0,YELLOW(),WHITE())
Hi,
That's what I want. Thank you very much.
May I ask 2 more questions?
I saw you use this expression to define value:
=if(SecondaryDimensionality()=0,sum({<[FQ]={ $(vMaxFQ)}>}[Value])-sum({<[FQ]={ $(vMaxPrevious)}>}[Value]),
sum(Value))
I don't understand $(vMaxFQ) and $(vMaxPrevious).
And in my case qty,amt,unit is already defined by sum function, can I just replace [Value] by an expression sth like sum(qty)?
Hi, Satish
I modified your qvw to test how it works when there are more values in data area.
And I got the result as below.
FQ1 and FQ2 are missed in this pivot and all FQ3 value are negative.
Is there any restriction when using function SecondaryDimensionality()?
Best regards
Wei
Hi,
vMaxFQ and vMaxPrevious are variables to get the max quarter and previous quarter, in your case you can create variables for months.
Yes you can replace Value with qty
Best Regards,
MVV Satish.
Hi,
Move the Values below FQ in the pivot, it should work.
Best Regards,
MVV Satish.