Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Bad Min or Max Value in Gauge

Hi All,

I'm trying to include a Gauge Chart in a column of my straight table, but get the above error when I try to do so.

I am trying to show the weighted average Margin on a particular set of contracts (decided by my selections), against the Margins on the whole portfolio of contracts ---> If the margin on my selected contracts is higher than the overall average, then the needle will sit in the green segment, otherwise it will sit in the red segment.

I've read elsewhere that you cannot set a MAX or MIN value per row, and have already tried to divide one by the other, so that I can manually input a range of -1 to +2 (this covers all rows), and when I display my expression as Text, I see that the expression works - but, when I choose a gauge, the error occurs.

The expression is along the lines of:

SUM (( [ {$} Value of contract] / SUM[Value of all contracts] ) * [ {$} Margin on contract])   -----> i.e. weighted average margin based upon selections

/

SUM (( [Value of contract] / SUM[Value of all contracts] ) * [Margin on contract])  i.e. weighted average margin for ALL contracts

Any ideas why this isn't working?

5 Replies
rajeshvaswani77
Specialist III
Specialist III

In properties guage settings. Check the Min and the Max values in these boxes. The value you are getting now is not in this range.

Not applicable
Author

No, that's not it.

I've viewed the expression as Text and checked the range of the values returned, and they fit within the range of -1 to +2. I've already amended the Max and Min Values to reflect this but it still doesn't work.

rajeshvaswani77
Specialist III
Specialist III

Can you post the expression?

Not applicable
Author

Here it is:

(Sum([Interest Margin (%)]*[Contract Production Amount]))
/
Sum(Contract Production Amount]))/100)
/
((
Sum({<YearMonth=, [Latest Month Flag]={Y}, Year=, Month=>}[Interest Margin (%)]*[Contract Outstanding])
/
Sum({<YearMonth=, [Latest Month Flag]={Y}, Year=, Month=>}[Contract Outstanding]))/100)

But like I said - when displayed as text, it's fine. It's only when I want to see the gauge chart that the problems arise...

rajeshvaswani77
Specialist III
Specialist III

Hardcode the value you are seeing, remove this expression to verify that.