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: 
Anonymous
Not applicable

How to take out the expression value(Total Value) from Pivot table for further calculation?

HI,

As you can see from below image, I want to know the percentage of NewPartValue  of AllValue in Expression Value.

I need to calculate as " NewPartValue *100/Allvalue %".   but I don't know how to take out the Express value(Total) out for

further calculation.  thanks advance for your help.

Express total value.PNG

5 Replies
sunny_talwar

When you say take out, do you mean show these values in a text box object?

Anonymous
Not applicable
Author

yes, I want to calculate the total value somewhere else like text box object

发自我的 iPhone

在 2018年1月6日,00:17,Sunny Talwar <qcwebmaster@qlikview.com<mailto:qcwebmaster@qlikview.com>> 写道:

Anonymous
Not applicable
Author

Hi, as you can see from below, I just want to put Grouped Value into Variable then use it later.

but LET var1 = 'xjan' don't work.  Please help out on how to get this done.  thanks!

xtemp:
load xetdmonth,
Sum(Calc_x)as xsubtotal
RESIDENT Finalx
GROUP BY xetdmonth;


xvar:
LOAD
if (xetdmonth='Jan',xsubtotal) as xjan,
if (xetdmonth='Feb',xsubtotal) as xfeb,
if (xetdmonth='Mar',xsubtotal) as xmar
RESIDENT xtemp;
drop table xtemp;

LET var1 = 'xjan';
LET var2 = 'xfeb';

tresesco
MVP
MVP

Try using peek(), like:

LET var1 = Peek('xjan');

LET var2 = Peek('xfeb');


However, instead of doing this in the script, you could probably use set analysis in the UI like:


UI:

     vJan=Sum({<xetdmonth={'Jan'}>}Calc_x)

Anonymous
Not applicable
Author

Sorry for later reply! and thanks for you solution.

I have tried LET var1 = Peek('xjan');  but it return with Var1 = 0