Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have the following diagramm
It shows the average gross sales depending on the selected period. The period could be day, week and month. I can create three diagramms for every period. But I don't like it. So is it possible to make an aggr function wich use a variable for the period?
Something like this:
aggr( sum(Sales / count(AD_ID_COUNT)), Year, $(=vPeriod) )
but this didn't work.
Do you have any solution for this problem?
Thanks for help.
regards
Bastian
Did anyone ever found an answer to this? I also cant get it working!
Regards,
Tjeerd
Hi Tjeerd,
To take a better look I need a testapp. But in the original topic I would skip the '=' in $(=vPeriod).
The rest looks right to me.
Groeten,
Halmar
Thanks for your answer Mr. Heijnen. However, it seems to me that it isn't allowed to use expressions in an aggregation function. The manual says:
" Each dimension must be a single field. It may not be an expression (calculated dimension)."
A walkaround would be to create a variable and use the function
if(getselectedcount(week),week,
if(getselectedcount(month),month,
year)))
Create 3 charts with different periods but that have exactly the same layout. Use the variable in a conditional show to show the right chart to the user.