Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, Can I have an expression in a chart that can both sum and average depending on selection? I'm currently using two charts, one hidden which uses if(sum when a certain selection (user) is made.
The issue I'm having is when the user selection is chosen first it jumps to the hidden chart which has the sum expression is used when indeed I need the average chart displaying.
Thanks!
try this expression
if(getselectedcount(YourField1)>=1, Sum(Amount),
if(getselectedcount(YourField2)>=1, Avg(Amount),Sum(Amount)))
You can also look into using a single chart with conditional expressions, i.e. you would create multiple expressions and enable 'Conditional' with a condition set like
=GetSelectedCount(FIELD)>0
resp.
=GetSelectedCount(FIELD)=0
I believe using conditional expressions. QV won't need to calculate both aggregations, the sum and the average when only one is needed.
Please post a sample application
Thanks
Regards
Marco
If you want user dependent expressions then OSUser()='some name' might work as condition.
See if the below link will help :
Drilldown charts with values and percentages on the stacked bar