Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear Community,
I have created a Bar chart with the following expression in the Static Max box.
if(GetSelectedCount(ReportingDate)=1,Ceil(vMaxAtts,10),1000)
The value of vMaxAtts was determined in the Script and represents the maximum value per reporting date over the entire date range. The expression in the chart is sum(CountAtts) per timeband during the day.
What I want to happen is:
when the user selects one ReportingDate then the Static Max should be fixed - I am happy with this part of the expression.
when the user selects more than one (or does not make a selection) the Static Max should function as it does without an expression, i.e. Automatic - I don't know how to do this, I have entered 1000 into the expression for now.
Thank you for any help with this.
This is an interesting topic.
What happens if you use :
if(GetSelectedCount(ReportingDate)=1,Ceil(vMaxAtts,10))
You can also try:
if(GetSelectedCount(ReportingDate)=1,Ceil(vMaxAtts,10),Ceil(Max(Aggr(sum(CountAtts),Dimension)),2))
Hope it helps
Thanks
AJ
This is an interesting topic.
What happens if you use :
if(GetSelectedCount(ReportingDate)=1,Ceil(vMaxAtts,10))
You can also try:
if(GetSelectedCount(ReportingDate)=1,Ceil(vMaxAtts,10),Ceil(Max(Aggr(sum(CountAtts),Dimension)),2))
Hope it helps
Thanks
AJ
Excellent, thanks for our answers AJ.
Your second suggestion is the kind of answer I was looking for and this worked, thank you.
In your first suggestion I thought you'd mistakenly missed out the FALSE part of the IF statement but I tried it anyway and that worked too!
I also tried if(GetSelectedCount(ReportingDate)=1,Ceil(vMaxAtts,10),) which also worked.
So, the best answer for me is going to be your first suggestion - i.e. nothing specified for the FALSE part.
Thanks again.