Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
micsim123
Contributor III
Contributor III

Set expressions

Hi Qlik'ers

I have a KPI chart that shows the sum of Sales in years >= 2014 in US region

sum({<Region = {US}, Year = {'>= 2014'}>} Sales)

But if I filter on Year = 2015 I want the KPI to sum only on Year = 2015, and not all the years 2014, 2015, 2016, 2017.

My data also contain years before 2014, but I do not want to include them in the sum.


How can I do that?

Best regards

Michael


3 Replies
sunny_talwar

Try this

Sum({<Region = {US}, Year *= {'>= 2014'}>} Sales)

Read about the use of astrick here:

Implicit Set Operators

Clever_Anjos
Employee
Employee

sum({<Region = {"US"}, Year *= {">= 2014"}>} Sales)



ps:you should use double quotes

micsim123
Contributor III
Contributor III
Author

Hi Sunny

It works fine. Thank you, also for the link.