Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
When you say take out, do you mean show these values in a text box object?
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>> 写道:
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';
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)
Sorry for later reply! and thanks for you solution.
I have tried LET var1 = Peek('xjan'); but it return with Var1 = 0