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

How to Display the Expression In a Gauge Chart

I created a gauge chart with no dimensions that shows a percentage. Right now the gauge chart works and the percentage is showed by the needle correctly. However, I need a way to display that value within the gauge chart itself. I know its possible as I have seen it in other files, but I can't figure out how to do it.

Basically, right now when I hover my mouse over the gauge, the correct value appears, but I just need to display that value at all times on the gauge or near it.

Any help would be greatly appreciated.

Yiling

1 Solution

Accepted Solutions
Not applicable
Author

hi Yiling,

you can definitely do this by defining 'text in chart' field under properties>presentation>text in chart.

there u can define a same expression again to display percentages. num function will be used here to display correct number format. for an example if i have a field Amound_Sold and another field Total_Amount than your formula will be:

=

num(SUM (AMOUNT_SOLD) / SUM(TOTAL_AMOUNT), '#.#%')



this will show your percentages within a chart also.

hope this will work

Regards,

Afzal.

View solution in original post

5 Replies
Not applicable
Author

hi Yiling,

you can definitely do this by defining 'text in chart' field under properties>presentation>text in chart.

there u can define a same expression again to display percentages. num function will be used here to display correct number format. for an example if i have a field Amound_Sold and another field Total_Amount than your formula will be:

=

num(SUM (AMOUNT_SOLD) / SUM(TOTAL_AMOUNT), '#.#%')



this will show your percentages within a chart also.

hope this will work

Regards,

Afzal.

Not applicable
Author

I tried your solution with both the Num and the Num# functions but both just displaying the expression text so Num(Sum(Margin)/Sum(Sales),'#,#%') would appear instead of just 20.4%.

Not applicable
Author

Sorry I forgot the equal sign!

Your solution works.

Not applicable
Author

Btw, how would I link text and values together?

For example, I want to show something that says "Margin%: 20.3"

Not applicable
Author

Here it is

='Margin%: ' & Num(Sum(Margin)/Sum(Sales),'#,#%')

Philippe