Skip to main content

Gauge fill to value with conditional colors

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
richbyard
Contributor III
Contributor III

Gauge fill to value with conditional colors

Last Update:

Jan 12, 2016 1:26:49 AM

Updated By:

richbyard

Created date:

Jan 12, 2016 1:26:49 AM

Attachments

One use case I have been asked about is fill to value gauges being conditional on a target value (in this example I have used a variable to set the target to be able to test things).

Gauge Conditional Color.png

To do this follow the steps below:

Step 1 Create your gauge with your measure as normal.

Step 2 – Set up two segments for the gauge

  • Click add limit
  • Make the first segment green
  • Set the value for the first segment as the same as your measure for the gauge (i.e. it will always be green unless we tell it otherwise)
  • Make the second segment red
step2.png

Step 3 – create a third segment

  • Click add limit
  • Make the third segment Grey
  • Enter a calculated condition in the formula for this second breakpoint

  1. e.g.

=if([Measure formula]>=[Target Value], [Measure formula],0)

Explanation of behavior:

If the measure is >= the target then we will make this segment not show as it will be the same value as the segment boundary we created in step 1.

If the measure is < the target then we will set the boundary to 0 which makes this segment overwrite the green segment from step 1.

  Once this has been done you will notice that only two segments will show at one point in time which is how we have programmed it to work. However, this does make the gauge hard to change once setup which is why these steps are important.
Step3.png

example app attached... Please not that the variable uses an extension so I have attached this also.

Comments
Anonymous
Not applicable

Thanks , useful information

Anonymous
Not applicable

It looks really nice

How did you inset the drop down for target value?

richbyard
Contributor III
Contributor III

Hi Peter,

I used the QS Variable extension which I have attached (although this was some time ago) and provided the link to branch for in the post. It's a great extension for managing variables and can be button, dropdown, input field or list...

Cheers

Richard

0 Likes
Anonymous
Not applicable

This is really useful.

Can I ask how this would work if you needed three colours as opposed to two (e.g. Red, Amber, Green)?

amarcycycycy1
Contributor
Contributor

Hi

In line chart how to increase line size with out any extension and in Gauge chart how to hide the speedometer line 

Version history
Last update:
‎2016-01-12 01:26 AM
Updated by: