Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
nesonica
Contributor III
Contributor III

Aggregate calculated dimension

Hi guys! 🙂 

I am trying to build a calculated dimension with an aggregation of something like this here and I have no clue how to build that without errors. Could you help me please? 🙂

 

aggr (

if(SALES_S > 0,S,0)

&

if(SALES_H > 0,H,0)

&

if(SALES_I > 0,I,0)

)

Labels (3)
1 Solution

Accepted Solutions
jaibau1993
Partner - Creator III
Partner - Creator III

Hi!

I am not sure of what is your desired output but we can start by writting correctly that Aggr function. Aggr takes at least two arguments, the first one is an expression (as you did) but it needs a second argument which especifies the dimension for which you are aggregating the expression of the first argument. You may aggregate for more than one dimension:

Aggr( Expr, Dim1, Dim2, Dim3, ...)

So, your Aggr needs a dimension (or more).

Hope it helps,

Jaime.

View solution in original post

2 Replies
jaibau1993
Partner - Creator III
Partner - Creator III

Hi!

I am not sure of what is your desired output but we can start by writting correctly that Aggr function. Aggr takes at least two arguments, the first one is an expression (as you did) but it needs a second argument which especifies the dimension for which you are aggregating the expression of the first argument. You may aggregate for more than one dimension:

Aggr( Expr, Dim1, Dim2, Dim3, ...)

So, your Aggr needs a dimension (or more).

Hope it helps,

Jaime.

nesonica
Contributor III
Contributor III
Author

this worked perfectly for me, thanks so much!