Discussion Board for collaboration on QlikView Scripting.
I have a variable to do a sum of a field in my data model. The result is then split by another field in the column
For e.g. Sum of total customers. This is then split by countries.
UK - 500
US - 300
Total - 800
If I use a straight table with Countries as dimension and =SUM(totalcustomers) as expression, this works all OK.
If I then use a variable to store the sum of total customers and use this variable as expression, the straight table doesn't seem to split by countries. It shows the total customers for all countries.
UK - 800
US - 800
Please see attached.
Go to Solution.
try to read here
The Magic of Variables
Have you used the '=' when defining your variable? Try '=Sum(totalcustomers)' vs 'Sum(totalcustomers)'
Can you post a sample of your app?
Yes all variables are defined with an "=" sign.
SET vTotalCustomers = '=SUM(TotalCustomers)';
try with one of
Set vTotalCustomers = Sum(TotalCustomers) ;
Let vTotalCustomers = 'Sum(TotalCustomers)' ;
and then as expression in chart