Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Gauge Display Problem.

I have a query which may return no results as below:

LOAD  Count(ProductID) as Critical  

Resident Product

WHERE          UnitsInStock <ReorderLevel

I display the  Critical on a Gauge (Led) and when no result return from the query the Gauge dissaperas where I would like to show the number 0.

Also I tried to show the result of Critical on a Listbox to check if it is null or not nothing came up,

Briefly my question is; how can I show the result as 0 when there is no results?

Thanks

Max

2 Replies
swuehl
MVP
MVP

Maybe just append something like this to your script after your query (Result is your table name, change it to your given table name):

if( NoOfRows('Result') ) = 0 then

LOAD * INLINE [

Critical

0

];

end if

Hope this helps,

Stefan

Not applicable
Author

Could you try ensuring 0 is returned rather than null?

if(isnull(Count(ProductID)),0,Count(ProductID)) AS Critical


James