Reputation: 97
My Excel source data looks like this:
State A B C D E F Total
------------------------------------
India 5 2 1 9 5 5 27
USA 4 5 6 5 4 2 26
Germany 1 2 2 5 2 1 13
I need the following columns:
Column 1 High = A+B+C+D
Column 2 Low = E+F
For example, for India the result should be:
High = 17
Low = 10
If I select India, I need to show the result like this:
I tried to add a calculated dimension to the chart as below:
State
High (A+B+C+D)
Low (E+F)
How can I recreate the above pie chart in QlikView?
Upvotes: 0
Views: 4293
Reputation: 228
You can use a synthetic dimension:
valuelist('High', 'Low')
..and this expression:
if(valuelist('High', 'Low') = 'High', sum(A+B+C+D), sum(E+F))
Upvotes: 2
Reputation: 31
bdiamante's answer is the easiest solution to your problem, the other option would be to place the sum's in the expressions fields for the pie chart. Expressions give you more flexibility to display tool tips explaining the content to your users.
Expressions could also cause issues if your selection process is not refined enough.
Upvotes: 0
Reputation: 17610
If that's an excerpt from your script where you load that table, the proper syntax would be:
...
State,
A+B+C+D as High,
E+F as Low
...
If that's not in script, but rather in a true calculated dimension, I would move it to the script as shown above.
Upvotes: 3