Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi
i am using aggr function in an expression but performance is heavily affected. is there any alternate?
eg:
variable vtype = (If([Client Type] = 'Client', '[Client ID]','[Customer ID]'))
in the expression, i am using
Aggr(Maxstring($(vtype )),Country)
Maybe or maybe not. Hard to tell with the information provided.
hi stefan,
above is the example expression. anyway to simplify it?
couldnt able to share data..
but calculating revenue of client or customer for the country...
some country the type is client some country type is customer
this page is for global page design, which involves a chart to show revenue for all countries..(So it is a mix of client and customers)
so based on the country it will pull up the type and calculate revenue.
Gautham
What's the context of your expression? Where are you using it?
How does your data model look like?
The variable is defined with a leading equal sign, so it returns either of the two field names?
variable is just this (If([Client Type] = 'Client', '[Client ID]','[Customer ID]'))
i have to calculate revenue based on Client type of the country,
for some country Client Type is Client then calculate revenue of all client id of that country
for some country Client Type is not client then calculate revenue of all Customer id of that country
Aggr(Maxstring($(vtype )),Country) will give me client id or customer id for country in the dimension.
sum({<Aggr(Maxstring($(vtype )),Country) >} Revenue)
Can't see how this should work. Are you using
Aggr(Maxstring($(vtype )),Country)
as calculated dimension in a chart? And why are you aggregating the clients / customers using Maxstring()?
Your expression
sum({<Aggr(Maxstring($(vtype )),Country) >} Revenue)
does not seem to use correct set analysis syntax.
hi stefan,
attached a small example of how my data looks..
from the example, i want sum of revenue based on Ftype..please help
Gautham
What is the expected result from that Straight table?