
Contributor II
2022-04-29
10:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to create a measure to sum certain values on a column based on another column's values?
So on the table below I have "Count_" values on the far right and on the far left I have "CPOE_Ord_Ind". I want to create a measure so that it will sum up all the values in "Count_" only if "CPOE_Ord_Ind" shows "Y". So based on the table below I want the result of 9. Sorry if this is trivial but I'm new to Qlik Sense.
1,142 Views
3 Replies

Specialist
2022-04-29
12:07 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Try this:
Sum({<CPOE_Ord_Ind={'Y'}>}Count_)
Regards,
Vitalii
Press LIKE if the given solution helps to solve the problem.
If it's possible please mark correct answers as "solutions" (you can mark up to 3 "solutions").
If it's possible please mark correct answers as "solutions" (you can mark up to 3 "solutions").
1,116 Views

Contributor II
2022-04-29
01:22 PM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your reply. I tried that one but it didn't work for me.
So I tried this instead:
Sum({<CPOE_Ord_Ind={'Y'}>}num(trim(Count_)))
This seemed to work perfectly, but I have no idea why. I'm still learning Qlik Sense.
Thanks again though!
1,111 Views


Champion III
2022-04-30
01:41 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This means you have blank spaces in your fieldvalues, suggest you trim(Count_) while loading the data in your script
Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
If a post helps to resolve your issue, please accept it as a Solution.
1,095 Views
