Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sum dimension's value in a bar chart

Hi,

I have a bar chart with a dimension country and in my expression i want to sum 2 country on my dimension.

I try this :

IF(DimCountry="Marseille",

Sum( {$<DimCountry = {“Marseille”,”Aix en Provence”}>} Montant ),

Sum(Montant)

)

but that doesn't work...

How have to I make ?

Thanks a lot.


1 Solution

Accepted Solutions
swuehl
MVP
MVP

You still get only the value for Marseille?

I believe you need to use a total qualifier in your sum, where you want to retrieve values for dimension values outside your current (Marseille) dimension scope:

IF(DimCountry="Marseille",

Sum(total {$<DimCountry = {“Marseille”,”Aix en Provence”}>} Montant ),

Sum(Montant)

)

View solution in original post

2 Replies
swuehl
MVP
MVP

You still get only the value for Marseille?

I believe you need to use a total qualifier in your sum, where you want to retrieve values for dimension values outside your current (Marseille) dimension scope:

IF(DimCountry="Marseille",

Sum(total {$<DimCountry = {“Marseille”,”Aix en Provence”}>} Montant ),

Sum(Montant)

)

Not applicable
Author

Thanks  a lot !!!