Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
asmithids
Partner - Creator II
Partner - Creator II

Gauge Chart Min/Max Setting

Hello,

I created a gauge that computes the average number of orders(i.e. References) per month using the following calculation.

=Avg(Aggr(Count (Reference),Year, Month)) 

On the Presentation tab, I set the following Gauge settings:

Min(Aggr(Count(Reference), Year, Month))

Max(Aggr(Count(Reference), Year, Month))


The issue is that when I select one month from my Month list box, I get an error of "Bad Min or Max Value in Gauge".  See attached screen shot.  When I select more than one month, the gauge computes the Min and Max without error.  See second screen shot.


Any information to resolve this issue would be much appreciated.  Thank you,

Screen Shot 2014-02-12 at 5.26.19 PM.png


Screen Shot 2014-02-12 at 5.33.38 PM.png

1 Solution

Accepted Solutions
Not applicable

Alec

=GetSelectedCount(Month)  will give you the count

Chris

View solution in original post

10 Replies
Not applicable

Hi Smith, Can you please post the sample qvw ?

fkeuroglian
Partner - Master
Partner - Master

Example please!

asmithids
Partner - Creator II
Partner - Creator II
Author

Please see attached QVW.

Thank you!

gaidamichal
Partner - Contributor III
Partner - Contributor III

Hi,

the reason that the max and min values are giving an error is because when you select one month, the max and min values are equal and the object cannot display te gauge. You need to make sure that the values are different.

Not applicable

Hi Alec

it is because when you select year and date your min = max   due to your aggr

so the gauge can't show anything

Chris

asmithids
Partner - Creator II
Partner - Creator II
Author

Hi Christian,

Thank you. 

Question, is there a function to count the number of months selected in the Month list box?  I'm thinking of adding an if statement to the Min setting like this:

if ("months selected" >1, Min(Aggr(Count(Reference), Year, Month)), 0)

By having a Min of 0 when one month is selected, I get the gauge to display a Min of 0 through the Max value.

Not applicable

Alec

=GetSelectedCount(Month)  will give you the count

Chris

asmithids
Partner - Creator II
Partner - Creator II
Author

Works great!  Thank you!

Not applicable

Alec dont you think that if you done this it will always shows your avg order in red side which is something wrong in my point of view

you can use like attached..