Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have 21 lines of data feeding into a graph.
Is it possible to only show that graph if say more than 10 of them are selected?
Once the graph is displaying a lower number of data lines than the original 21 often the axis parameters are out of proportion. Is there anyway to have the axis automatically adjust to be more relevant tot he data fields?
Thanks
Yes, you can use:
GetSelectedCount(YourFieldName)>2 and GetSelectedCount(YourFieldName)<10
For the second part, you can use an expression in the min and max of the axes to adjust it however you want. Under Chart Properties > Axes you can add a static min and max. For example, using this expression will make the max axis value always 500 more than the max of the Sum(Revenue):
=max(aggr(sum(Revenue),MonthYear))+500
In this example, I am using Sum(Revenue) as the line chart expression and MonthYear as the x-axis.
Under Layout > Conditional, you can use GetSelectedCount(YourFieldName)>=21.
Thanks for this.
It works perfectly.
Have you any ideas on the second question?
Thankyou
Apologies,
is there a way to add in an "and"? for example greater than 2 but less than 10
Yes, you can use:
GetSelectedCount(YourFieldName)>2 and GetSelectedCount(YourFieldName)<10
For the second part, you can use an expression in the min and max of the axes to adjust it however you want. Under Chart Properties > Axes you can add a static min and max. For example, using this expression will make the max axis value always 500 more than the max of the Sum(Revenue):
=max(aggr(sum(Revenue),MonthYear))+500
In this example, I am using Sum(Revenue) as the line chart expression and MonthYear as the x-axis.
Thanks very much. That works perfectly