Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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)
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)
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