Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I'm new to Qlikview and are just getting around making some of my first reports and dashboard.
I have a question. How do I get the sum of specific selected fields?
Lets say i have a table like below
Area Value
-----------------------
Asia 10
US 15
EU 5
Africa 50
How can i get a simple listbox which states:
Text Value
--------------------------------------------------
EU and Asia (Custom text) 15
Africa and US (Custom text) 65
Is that possible?
Hi
You could hardcode this in your expressions or hardcode a calculated dimension but this is usually considered poor practice. I would create a table for your dimension - for example add this to your load script:
CountryGroups:
LOAD * Inline
[
Area, CountryGroup
Asia, EU and Asia
EU, EU and Asia
Africa, Africa and US
US, Africa and US
];
Now use CountryGroup as the dimenion and Sum(Value) as the expression. If you add further countries, just extend the ContryGroups table accordingly.
Hope that helps
Jonathan
Thanks jonathan. THis really helped me out
Another user also replied with
=SUM({<Area={'Asia','EU'}>} Value)
=SUM({<Area={'US','Africa'}>} Value)
Thank you all