Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
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

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

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