Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Kunkulis
Creator
Creator

Sum values based on selected countries

Hello,

I have selected 3 countries:

  • Denmark (0.05)
  • Sweden (0.1)
  • Germany(0.5)

The numbers in brackets are the ones I want to Sum, but I keep getting 0
Also, please keep in mind, that there are way more countries in the app, so the SUM has to be dynamic and change on the selections.

Currently I am trying this formula, which seems correct, but, as I said, I keep getting a 0

=Sum({<Country={'$(=Country)'},Year={'$(=Year)'}>}Number)

I tried 

=Sum({<Country>}Number)

Which did work, but it gave me (what I assume) was the whole sum

 

Thank you in advance

Labels (2)
1 Reply
Steven_Haught
Creator III
Creator III

@Kunkulis 

Any chance you can share a sample of the data? I also assume that the country and Year in the $ Expansion are variables? What are the calculations for those?