Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Set analysis with text union

Hello everyone,

I'm facing a problem with an expression using set analysis. I want to have a bar chart of ratios by segment. One of this segment is called 'All Segments'. What I want is when I select one segment, the 'All Segments' appears too. I tried to make a union in my set analysis but it doesn't work.

Here is my expression:

sum(aggr(sum({[Segment]+={'All Segments'}>} [Nb Ref FULL]),Segment) /

  aggr(sum({[Segment]+={'All Segments'}>} DISTINCT [Nb Ref FULL Total]),Segment)*100)

Can someone help me with this expression ?

Thanks,

Quentin

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

To begin with the were some missing <'s. And you may also want to add the set modifier to the outer sum:

sum({<[Segment]+={'All Segments'}>} aggr(sum({<[Segment]+={'All Segments'}>} [Nb Ref FULL]),Segment) /

  aggr(sum({<[Segment]+={'All Segments'}>} DISTINCT [Nb Ref FULL Total]),Segment)*100)


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

To begin with the were some missing <'s. And you may also want to add the set modifier to the outer sum:

sum({<[Segment]+={'All Segments'}>} aggr(sum({<[Segment]+={'All Segments'}>} [Nb Ref FULL]),Segment) /

  aggr(sum({<[Segment]+={'All Segments'}>} DISTINCT [Nb Ref FULL Total]),Segment)*100)


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

Hi Gysbert,

Sorry about the '<', it was a mistake when I write the expression.

Thanks a lot for your answer it is working now.

Quentin