Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am having a hard time to aggregate measure over a dimension in bar chart?
So the following is the result table: I want to put this as a summary in bar chart. Basically, i want to count check on the graph but it does count correctly. Graph is below:
I have attached the Qlikview file and data file for reference.
Can someone check the qlikview file and suggest the correct logic to get this right?
Secondly,
I want a list box for Check and Good, where if i select it should only show Check values in the result table.
Does the attached file do what you want it to?
Assumption: you want to count the # of locations that have 'check' in the table per line (2C, 2E, 2F) in the third (green) bar in your bar chart.
What I changed:
- Instead of using the names for the other expressions in your third expression, I used the actual expressions. I can't say this for sure but I guess you can't reference other expressions in an Aggr function.
- I changed the the last parameter in the Aggr function to 'Location' instead of 'Line'. The way you were doing it means it was checking the if condition per line... and #Bins + #Orders is more than 2 for every group of locations per line, meaning every line got a value of '1'.
- I swapped the 0 and 1 in your if condition, otherwise it was counting 'Good' instead of 'Check'. If I made a wrong assumption and you want to count 'Good' instead, just swap them back
As for your second requirement... I'm not sure if it's possible to create a 'calculated listbox' or something, but it would probably be a lot easier to add the condition for 'check/good' to your script and create a flag field. It would make the chart a lot easier to create as well, as you could just sum(flag) or something like that...
Anyway, hope this helps, if not let me know