Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
TestingForTestPurposes
Partner - Contributor II
Partner - Contributor II

Cobination of set expressions in table column

Hi all,

 

this is probably a rather easy question: how can I bring together several set expressions in a way that they represent separate rows in a column of a table visualization?

Here the set expressions:

// Product A Available Volume
SUM({<eu={1},approval={'*'}-{1}>}budget) - SUM({<product={'A'}>}budget)
// Product B Available Volume
SUM({<eu={1},approval={'*'}-{1}>}budget) - SUM({<product={'B'}>}budget)
// Product C Available Volume
SUM({<eu={1},approval={'*'}-{1}>}budget) - SUM({<product={'C'}>}budget)
// Product D Available Volume
SUM({<eu={1},approval={'*'}-{1},level2_approval={'*'}-{0}>}budget)

The goal is that each of the set expressions will be listed as one row in a table visualization.

 

Thanks a lot already for your help!

Labels (5)
1 Solution

Accepted Solutions
hic
Former Employee
Former Employee

Set analysis is like a selection that is done BEFORE the chart is calculated. So it is not possible to have different conditions for different chart rows.

View solution in original post

3 Replies
hic
Former Employee
Former Employee

Set analysis is like a selection that is done BEFORE the chart is calculated. So it is not possible to have different conditions for different chart rows.

pravinboniface
Creator II
Creator II

If product is a dimension, then you can try this measure expression.

If (product<> 'D',
SUM({<eu={1},approval={'*'}-{1}>}TOTAL budget) - SUM(budget),

SUM({<eu={1},approval={'*'}-{1},level2_approval={'*'}-{0}>}TOTAL budget)
)
TestingForTestPurposes
Partner - Contributor II
Partner - Contributor II
Author

Could I use variables as a workaround in a way that I define those calculations within a variable and assign the different values to the different rows by using a function like below:


=IF(product='A', var_max_availible_A, IF(product='B', var_max_availible_B, IF(product='C', var_max_availible_C, IF(product='D', var_max_availible_D))))
​

Or will the SUM IF statements within the variable calculation lead to problems?
Or could the function above also lead to issues?