Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to select an alternative set (a bookmark) within an aggr with no luck. This does not work:
=sum(aggr(sum({BM2012<FiscalYear=,Year=,LOS = {">= $(vSlider)"}>} Distinct LOS), zNumber))
BM2012 is a bookmark for the fiscal year 2012-2013.
You might need to apply the set expression also to the outer aggregation:
=sum({BM2012<FiscalYear=,Year=,LOS = {">= $(vSlider)"}>} aggr(sum({BM2012<FiscalYear=,Year=,LOS = {">= $(vSlider)"}>} Distinct LOS), zNumber))
Could be also something different that causes your issue, but 'this does not work' is not a sufficient piece of information to really help you.
That is the right way to do: use the bookmark name into the set analysis. if no space, no need to use any bracket.
I am surprised with the Distinct qualifier into the sum() function
Fabrice
Thanks for the responses.
Swuehl, this gives me a figure double of what i expect to see.
You might need to apply the set expression also to the outer aggregation:
=sum({BM2012<FiscalYear=,Year=,LOS = {">= $(vSlider)"}>} aggr(sum({BM2012<FiscalYear=,Year=,LOS = {">= $(vSlider)"}>} Distinct LOS), zNumber))
Could be also something different that causes your issue, but 'this does not work' is not a sufficient piece of information to really help you.
I have only used a Bookmark as a workaround for the problem. The key requirement is to be able to select from a set, in this case fiscalyear '12-13', regardless of what the user selects for FiscalYear or Year fields on my app. So for example this function works:
=sum({<FiscalYear={'12-13'}, Year=,LOS = {">= $(vSlider)"}>} LOS )
But when using the criteria in an aggr it it the value returned is substantially less than the query excluding the aggr function. I am expecting them to be the same. (I have remove the vSlider for simplicity.)
=sum(aggr(sum({<FiscalYear={'12-13'}>} Distinct LOS, zNumber))
It's almost impossible to help you, just because we still know almost nothing about your data and setting.
Could you upload a small sample file?
Your two expressions differ not only in the use of advanced aggregation, but also in the field modifiers used (e.g. Year= ) and in the use of a DISTINCT qualifier. So I wouldn't be surprised getting a different result.