Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor III
Contributor III

Expression returns different result when used in Gauge Chart expression and when concatenated with Text in Chart

Hi,

I am simply showing up the production ratio with sale using a gauge chart. The expression is Sum(Production)/Sum(Sale). I am using the same expression in 'Text  in Chart' as well to show the numeric figure beside the chart needle. The problem is that the expression result is different in gauge chart and in Text. In gauge, it shows 23% but in text it shows 19.36%. I can't understand why is this happening. The expression is same on both places but result is different.

Screen shot of my gauge chart is attached.

Regards,

Taha

12 Replies
Highlighted
Specialist
Specialist

Hi Muhammad

Can you share a sample app? Or can you post your expressions?

Márcio

Márcio Rodrigo Campestrini
Highlighted
Not applicable

can you share your sample excel file

Highlighted
Contributor III
Contributor III

To ALL,

I can't share the real app I am working on, I am afraid. The expressions I am using are:

Gauge Expression: =Sum(BeveragesProduction)/Sum(BeveragesSale)

Text in Chart Expression: =Num(Sum(BeveragesProduction)/Sum(BeveragesSale), '##.##%')

I just tried to produce the case by making some dummy data on excel and then forming the gauge chart as same as I am doing in real app but case is not producing. Very strange. Does anyone has any idea what is wrong ?

Highlighted
Specialist
Specialist

Hi Muhammad

Only looking to your expressions it looks like there is no error.

Unfortunately I can't say more without looking at the chart.

Márcio

Márcio Rodrigo Campestrini
Highlighted
Creator III
Creator III

On the Presentation tab for the Chart, what values have you got for Min and Max Gauge Settings?

Highlighted
Not applicable

Hi

may be the num format has a strange behaviour

I tried yours and mine

see attached qvw

try this one istread

=num(sum(Production)/Sum(Sales) , '# ##0,00%')

best regards

chris

Highlighted
Contributor III
Contributor III

roger.stone‌ : Min 0 and Max 1

@christianj : I tried yours and its appearing like this:

expression result diff2.png

Any other idea  ?

Highlighted
Not applicable

Hi

it seems to be linked to your parameters format

did you just open my qvw or did you copy/paste what was inside into yours ?

chris

Highlighted
Not applicable

You should not need 2 expressions.  If you select the option on General tab'show title in chart' and leave the text biox blank, it will use the expression and place in the object. or copy/pase expression and palce in the textbox and format it.  The value in the title can then be moved using vtrl-shift

try it without formatting - the result should be correct

you would get something along the lines of the below example showing the values are the same, jsut not formatted (applciation provided by christianj above)