Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team,
Its a pretty simple thing, but am stuck somehow.
Created a variable called, V_Expression = Sum {<Set Analysis>} (Sales)
Using the variable in a Straight Table, with a Single Dimension, let's say Product. I would expect it show as like this -
Product | Sales |
P1 | $200 |
P2 | $500 |
P3 | $300 |
Where as its showing as -
Product | Sales |
P1 | $1,000 |
P2 | $1,000 |
P3 | $1,000 |
Please help on how to still use the expression in Variable and use the variable in Chart.
Hi Dicky, this variable should be a string and not a calculated value
V_Expression = 'Sum {<Set Analysis>} (Sales)';
Your variable should contain:
Sum( {<Set Analysis>} Sales)
and not:
= Sum( {<Set Analysis>} Sales)
and then it should work.
- Marcus
Hi andrey.krylov,
Thank you. but some how not helping though adding it as a string. Did I miss anything?
Hard to say but most likely. What does it show now? And maybe some sample..
Thank you. this one helped.
But for some reason, I have to use the Sum ( ) again the expression part of the chart, like this = Sum (V_Expression).
Here its not allowing as a part of nested aggregation.
Can we use Aggr ( ) somehow in the expression part?
Yes, you will need an aggr() but if you could add them to the variable depends on your real expression. In this simplified case it should work:
V_Expression:
aggr(Sum( {<Set Analysis>} Sales), Dim1, Dim2)
and then:
sum($(V_Expression))
If not you could do it in this way:
sum(aggr($(V_Expression), Dim1, Dim2))
- Marcus