Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

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
MVP
MVP

Gauge Display Problem.

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

Re: Gauge Display Problem.

Could you try ensuring 0 is returned rather than null?

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


James

Community Browser