Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have 3 geographical levels : City --> Country --> Continent (--> World).
I have 3 graphs representing the weight of the sales, ie. the sales of a level compared to the upper level.
In the graph "City", I show the sum of sales in the city, the sum of sales in the corresponding country, and the ratio.
In the graph "Country", I show the sum of sales in the country, the sum of sales in the corresponding continent, and the ratio.
In the graph "Continent", I show the sum of sales in the continent, the sum of sales in the world, and the ratio.
I would like to replace the 3 graphs by only 1 graph, with a cycle dimension.
The problem is that I don't know how to say in my expression "if I am in the dimension XXX then ...".
You're looking for the GetCurrentField() function. If you use:
it will return the name of the current dimension.=GetCurrentField(Geo)
Then you would just use:
if(GetCurrentField(Geo) = 'Country', ..., if(GetCurrentField(Geo)='City',...))
EDIT: I attached a sample, but one of the charts is different. I put the selected Geo in the chart header too.
I have an alternate solution : create a new selector to choose which dimension have to be used.
I think it's not the best solution.
You're looking for the GetCurrentField() function. If you use:
it will return the name of the current dimension.=GetCurrentField(Geo)
Then you would just use:
if(GetCurrentField(Geo) = 'Country', ..., if(GetCurrentField(Geo)='City',...))
EDIT: I attached a sample, but one of the charts is different. I put the selected Geo in the chart header too.
Exactly what I was looking for ! ![]()
Thank you very much !