Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
mgarcmun
Contributor II
Contributor II

Dynamic aggregation in a variable

Hi!

I'm created a master dimension (Customer Range) throught a measure.

And I want to show the following expression:

if(aggr(sum(Sales),Customer)*100<0,'Option1',

     if(aggr(sum(Sales),Customer)*100>=0 AND aggr(sum(Sales),Customer)*100<0,

          'Option2',

          'Option3'

     )

)

Once the dimension is created, if I filter by 'Option1' (for example) the dashboard is filtered. Now, if I filter by other field (for example: customer type = pyme). I can see the data filtered by Customer Range = Opcion1 (i.e. Customers whose sales are less than zero) and Customer Type = PYME, but Customer Range dimension is recalculated and Customer Range dimension may not show only the 'Option1'.


Once field value filtered, could I do something so that it's not recalculated?

Is posible create a dynamic aggregation in a variable?

Thank you very much in advance!

Best Regards.

2 Replies
mgarcmun
Contributor II
Contributor II
Author

Could someone help me, please?

thanks.

dwforest
Specialist II
Specialist II

Not clear exactly what you are trying to do, but I think Set Analysis will get you there.

It sounds like you want the selection of Customer Type to be ignored for the "Option" calculation.

if(aggr(sum({<[Customer Type]=>}Sales),Customer)*100<0,'Option1',

     if(aggr(sum({<[Customer Type]=>}Sales),Customer)*100>=0 AND aggr(sum({<[Customer Type]=>}Sales),Customer)*100<0,

          'Option2',

          'Option3'

     )

)