Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Terra
Contributor II
Contributor II

Combine Multiple Distinct Expressions Into One Table

I am creating a table where I am specifying every row with an expression. I am trying to specify multiple expressions in one table.

Sample Call Data:

Client Company ID Lang Duration
Client A 1 Spanish 10
Client A 1 Spanish 33
Client A 1 English 50
Client B 2 English 15
Client B 2 Spanish 37
Client B 2 Spanish 57
Client C 3 English 4
Client C 3 Spanish 19
Client C 3 English 23
. . . .
. . . .
. . . .

 

Goal:

Client Metric SL Stat
Client A Avg connection time <30 AVG(Expression)
Client A Avg connection time Spanish <25 AVG(Expression)
Client A Avg Connection Time English <20 AVG(Expression)
Client B Avg connection time <40 AVG(Expression)
. . . .
. . . .
. . . .

 

Note: I am using a table but looking at it from a pivot table point of view, Client, Metric, and SL are dimensions and Stat is a measure.

Here is the problem I am facing. The expression is not allowing me to display the same value if the expression is using the same argument. 

Client:

IF(companyID = 1, 'Client A',

IF(companyID = 1, 'Client A',

IF(companyID = 1, 'Client A',

IF(companyID = 2, 'Client B',''))))...

Only 1 'Client A' is showing, not 3. 

Is there a way around this? I have tried:

  • IF(companyID = 1, 'Client A', '') & IF(companyID = 1, 'Client A', '')
  • Also tried with +

I don't want to split this into separate tables and stack them on top of each other to achieve this. I would like everything in 1 table. 

The other columns will follow this logic:

Metric:

IF(companyID = 1, 'Avg connection time',

IF(companyID = 1, 'Avg connection time Spanish',......''))

Labels (1)
0 Replies