Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm trying to create a set analysis function
=sum({<[Region Name]={'North America'}>}$(vOrder))
Where $(vOrder)= sum(field1)+sum(field2)+sum(field3)
If the total Order =700M and North America Total Order =170M. So I want the Total Order for only North America.
I tried the above expression and it throws me an nested agg error.
Thanks.
Seems to be working for me in this sample
Only thing to make sure is that don't have a = sign in your variable definition. Try it without the equal sign
May be try like this:
Sum({<[Region Name]={'North America'}>} Aggr($(vOrder), <YourChartDimensionsHere>))
Replace <YourChartDimensionsHere> with the dimensions you have in your chart where you are trying to perform this calculation
I don't have a dimension to this. I'm trying to achieve this in a Text object.
Then try this:
Sum({<[Region Name]={'North America'}>} Aggr($(vOrder), [Region Name]))
I've tried it and it throws me a 0 as final result.
I know the Total Order for North America is more than 100M.
Please note: vOrder = sum(Field1)+sum(field2)+sum(field3)
How about this? vOrder without dollar sign expansion?
Sum({<[Region Name]={'North America'}>} Aggr(vOrder, [Region Name]))
Would you be able to share a sample if the above doesn't work?
Seems to be working for me in this sample
Only thing to make sure is that don't have a = sign in your variable definition. Try it without the equal sign
Yes, maybe I was using = while defining the variable.
The values are matching for me now.
Thanks a lot, it was very helpful.
Awesome