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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Gauge Chart based on text values

Hi All,

I have a gauge chart, I need to display the sliding needs based on a column which has text values, not based on the integer value.

Eg:

needle till Segment 1 - if (column_name='value1')

needle till Segment 2 - if (column_name='value2')

needle till Segment 3 - if (column_name='value3')

needle till Segment 4 - if (column_name='value4')

How do i mention in the Gauge Settings?

Thanks in advance.

4 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Use this as expression: match(column_name,'value1','value2','value3','value4'). The expression will return 1 if the value of column_name is value1, returns 2 for value2 etc. It transforms the string values in numbers. You can set the segment borders at 1,2,3 and 4.


talk is cheap, supply exceeds demand
Not applicable
Author

Hey Gysbert,

Thanks for your reply.

That trick seems to be working. I wrote the match condition based on my condition and changed the gauge setting in the 'Presentation' tab. I have set up the segments I need, I have different colors for different segment.

When I see in the 'Style' tab, I am able to see the gauge needle raised to the segment based on the data but for some reason, the actual gauge needle (sheet object) is not raised based on the value in data.

Not sure why is that, I have the right coloumn in the 'Dimensions' tab, I  have defined the condition in the 'Expressions' tab..

Not applicable
Author

Okie, I just found out that what ever changes that is happening in charts in the 'Style' tab is based on the settings we give in the 'Presentation' tab.

So the actual object in the sheet is the one that reflects the data. But that is not seems to be working.

I think the expression that you provided will work when loading the script. I will try that once.

But if anybody has any comments or suggestions please let me know.

Not applicable
Author

Can anyone help me with sample chart object that displays data with qlikview's pick and match function in the expression?

I have several example that has in text and list box's expression but not in graph and I believe we can do it in graph objects as well.

Any simple example will be very helpful.

Thanks in advance.