Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, is there a way to set a variable value directly to a value retrieved from a resident table, something like this:
SET myVariable = SUM(Quantity) RESIDENT myTable
Thank you,
Jose.
Hello,
Let myVariable=sum(Quantity);
will assign to myVariable the result of fhe sum.
Qlikview don't care with which table the field has been loaded.
Pierre.
Thank you for replying,
Using the syntax LET myVariable = SUM(Quantity);
Im getting this message:
"Aggregation expressions not allowed in GROUP BY clause"
Thank you in advance,
Jose.
I ran into this too. This is what I did to get my statistic.
mydatasummed:
load sum(MyVariable) as MyVariableSum resident mydata ;
let x = peek('MyVariableSum',0,'mydatasummed');
See if that works for you.
I can propose another syntax:
mydatasummed:
mapping
'mysum'
as mysum,
sum
(Quantity) as myquantity
resident
If you use the syntax proposed by Tim, do not forget to drop the table
Pierre.
myTable;let
myvariable=applymap('mydatasummed','myquantity');loadThis Works!