Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Gauge Settings Not Working As Expected

I am having trouble getting my min and max setting to correctly set themselves up in my gauge. I am using the following:

Dimension: CalendarDate

Expression: interval(avg({<QUALIFY_AVG_OUTPAT_WAIT_YN = {'Y'}, QUALIFY_MRI_CYCLE_YN = {'Y'}, SEDATION_YN = {'Y'}>}PROC_BEGIN_TIME-APPT_TIME),'mm')

Presentation Tab Looks Like the following:

Segment 1 Setting

error loading image

Segment 2 Setting

error loading image

The Guage Returned Looks like the following:

error loading image

The pop-up text on the needle gauge show "21" which is the correct number. However, my min gauge setting should show 1 and my max should be 48.

0-20 should be green while anything over 20 should be Red.

Any suggestions?

Thanks,

Scott

Labels (1)
1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Scott

I think your problem is caused by the dual value that interval returns. The text representation (what you are seeing on the popup and as displayed on the chart tic lables) is in minutes. The internal value is actually in day fraction terms - ie a text value of '21' has an internal numerical value of 21 / (24 * 60) = 0.0145833.. You can verify this by putting your expression inside a Num() function in a text box.

So what this means is that your max value is in the numeric representation and is 48 days, not 48 minutes, Segment 1's lower bound is 1 day (should be zero). Segment 2's lower bound is 20 days. That explains why the tic lables on the guage are strange (they are the text representation,

Try changing:

  • max value to =48/(24*60)
  • segment 1 lower bound to 0
  • segment 2 lower bound to =20/(24*60)

I don't think that it is necessary to change your expression.

Hope that helps.

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

5 Replies
vupen
Partner - Creator
Partner - Creator

The expression should be an aggregate function..

Switch the AVG and Interval functions:

avg(interval({<QUALIFY_AVG_OUTPAT_WAIT_YN = {'Y'}, QUALIFY_MRI_CYCLE_YN = {'Y'}, SEDATION_YN = {'Y'}>}PROC_BEGIN_TIME-APPT_TIME),'mm'))

jonathandienst
Partner - Champion III
Partner - Champion III

Scott

I think your problem is caused by the dual value that interval returns. The text representation (what you are seeing on the popup and as displayed on the chart tic lables) is in minutes. The internal value is actually in day fraction terms - ie a text value of '21' has an internal numerical value of 21 / (24 * 60) = 0.0145833.. You can verify this by putting your expression inside a Num() function in a text box.

So what this means is that your max value is in the numeric representation and is 48 days, not 48 minutes, Segment 1's lower bound is 1 day (should be zero). Segment 2's lower bound is 20 days. That explains why the tic lables on the guage are strange (they are the text representation,

Try changing:

  • max value to =48/(24*60)
  • segment 1 lower bound to 0
  • segment 2 lower bound to =20/(24*60)

I don't think that it is necessary to change your expression.

Hope that helps.

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Thanks Jonathan!!

Works Great!!

jonathandienst
Partner - Champion III
Partner - Champion III

Scott

Could I suggest that you verify the correct answer, rather than your response. The purpose is to direct people with the same problem to the solution to the problem, without having to read all the postings.

Thanks

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Sorry about that.. hit the button in the wrong spot. Got if verified... Thanks!!