Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello!
I have the following Mekko Chart:
With the Dimensions:
And the Expression:
COUNT ({$<ID_TIME_DATE#={">=$(='$(vDateFrom)') =$(='$(vDateTo)')"}>} DISTINCT ACCOUNT_ID)
/
COUNT (TOTAL<ZONE> {$<ID_TIME_DATE#={">=$(='$(vDateFrom)') =$(='$(vDateTo)')"}>} DISTINCT ACCOUNT_ID)
Everything is great so far, but the thing is that now I want to add a cyclic group instead of having only the Zone Dimension, in order to have something like: Zone, Neighborhood, City, etcetera. The expression should be the same, except for the second part:
COUNT (TOTAL<ZONE> {$<ID_TIME_DATE#={">=$(='$(vDateFrom)') =$(='$(vDateTo)')"}>} DISTINCT ACCOUNT_ID)
Is there any way to calculate the TOTAL<ZONE> for every selected dimension from the cyclic group? (Replacing with TOTAL<ZONE> / TOTAL<NEIGHBORHOOD> / TOTAL<CITY> depending on the selection in the group).
I thought maybe using GETCURRENTFIELD (CyclicGroupName) which returns me the name of the field I'm using as a dimension.
But how could I use the function inside the total?
Or maybe creating a chart for every dimension and hide the others while showing one?
Or do you have any other idea of how to do that?
Thank you!!!
Hi,
Have no idea how to use GETCURRENTFIELD in Total, but you may use it in the expression.
if (GETCURRENTFIELD (CyclicGroupName)='ZONE' , COUNT (TOTAL<ZONE> {$<ID_TIME_DATE#={">=$(='$(vDateFrom)') =$(='$(vDateTo)')"}>} DISTINCT ACCOUNT_ID),
if (GETCURRENTFIELD (CyclicGroupName)='NEIGHBORHOOD' , COUNT (TOTAL<NEIGHBORHOOD> {$<ID_TIME_DATE#={">=$(='$(vDateFrom)') =$(='$(vDateTo)')"}>} DISTINCT ACCOUNT_ID),
if (GETCURRENTFIELD (CyclicGroupName)='CITY' , COUNT (TOTAL<CITY> {$<ID_TIME_DATE#={">=$(='$(vDateFrom)') =$(='$(vDateTo)')"}>} DISTINCT ACCOUNT_ID),
)
)
)
However, It's not that good solution.
Try like:
Total <$(=GetCurrentField(GroupName))>
Thanks - good suggestion and works well.