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 Indicator1 when Dim1=ValueX and Dim2=ValueY

Hello

How can I a set up an expression to SUM Indicator1 when Dimension 1 has a certain value and a Dimension 2 another particular value

1 Solution

Accepted Solutions
Not applicable
Author

Hi Armas

You could use set analysis in an expression such as

=Sum({$<Dim1={ValueX},Dim2={ValueY}>}Indicator1)

This will sum the values of Indicator1 only where DIM1=ValueX and DIM2=ValueY.

E.G.

Indicator1Dim1Dim2
252060
453050
1003050
244050
244576

Sum({$<Dim1={30},Dim2={50}>}Indicator1)

gives the answer 145 i.e. 100 + 45, the two values of indicator1 where Dim1=30 and Dim2=50.

Hope that helps

Steve

View solution in original post

2 Replies
johnw
Champion III
Champion III

sum({<Dimension1={'Some Value'},Dimension2={'Another Value'}>} Indicator1)

Not applicable
Author

Hi Armas

You could use set analysis in an expression such as

=Sum({$<Dim1={ValueX},Dim2={ValueY}>}Indicator1)

This will sum the values of Indicator1 only where DIM1=ValueX and DIM2=ValueY.

E.G.

Indicator1Dim1Dim2
252060
453050
1003050
244050
244576

Sum({$<Dim1={30},Dim2={50}>}Indicator1)

gives the answer 145 i.e. 100 + 45, the two values of indicator1 where Dim1=30 and Dim2=50.

Hope that helps

Steve