Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a line chart where the values are between 100 and -500 (Y values this means).
I want to limit the scale to a minimum of -100, but only when it's needed.
What I mean is that when there are indeed values surpassing -100, it should limited to -100, otherwise it should be limited to the lowest value present (as it would have if I haven't changed the scale's static min).
This gets a bit trickier as I can't use simply 'if(min(aggr(exp,diam))<-100,-100,min(aggr(exp,diam))' because I have multiple conditional dimensions where only two are enabled each time.
Thanks for your help!
Edit: Attached is a simplified example of my chart.
It shows 'Amount' over time, where time could be Months or Quarters (can be selected from the list box).
What I want that if the chart would have values under -100, it would limit it to -100 (for example, months 6, 7, 8, 9, 10 selected),
But if months 1, 2, 3, 4, 5 are selected, the minimum would be 10 (and not -100).
And all of that should work both when month and quarter are selected as Date Types.
Hi
you can use this for the Axis static min:
If(getfieldselections([DateType])='Month', RangeMax(-100, Min(Aggr(Sum(amount), Month))),
RangeMax(-100, Min(Aggr(Sum(amount), Quarter))))
But QV seems to be confused by the static min as it moves the clipped data points. See the attached for a comparison with and without the static minimum.
HTH
Jonathan
Hi Amalin,
Could you attach a sample?
Thanks
I have edited the message and added the attachment.
Thanks!
Hi amalin,
Is there is always two dimensions you can use variables to use expression like:
if(min(aggr(sum(amount),$(vDim1), $(vDim2)))<-100,-100,min(aggr(sum(amount),$(vDim1), $(vDim2))))
Hope this helps
Hi
you can use this for the Axis static min:
If(getfieldselections([DateType])='Month', RangeMax(-100, Min(Aggr(Sum(amount), Month))),
RangeMax(-100, Min(Aggr(Sum(amount), Quarter))))
But QV seems to be confused by the static min as it moves the clipped data points. See the attached for a comparison with and without the static minimum.
HTH
Jonathan
Or even simpler:
RangeMax(-100, Min(Aggr(Sum(amount), $(=getfieldselections([DateType])))))
(so long as the values in DateType are actual field names)
Thanks!
I had adjust it, but it worked like a charm.