Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
melissapluke
Partner - Creator
Partner - Creator

Creating flags for keys with multiple rows

I have a table like this:

ID Code Code Type Dollar Amount

1 111 Red $100

1 112 Red $150

1 113 Green $120

1 114 Blue $50

2 117 Green $170

2 119 Blue $3

2 119 Yellow $30

3 201 Red $1

I want to create a flag of some sort to be able to count totals of the code type either by ID or overall.
For example:
ID 1 I would want a total of $250 for red, $120 for green and $50 for blue.
Overall, I would want a total of $251 for red, $290 for green, $53 for blue, and $30 for yellow.

Finally, I want to be able to exclude flags. So for example, if I wanted to include IDs that had red and exclude IDs that had a yellow associated with it, I'd exclude all of the values for ID 2, and only total the sums for ID 1 and 3, giving me a total of $251 for red, $120 for green and $50 for blue . Any suggestions would be appreciated.

10 Replies
sunny_talwar

Super, I am glad we finally agreed that doing it on the front end is the better option here.

Best,
Sunny