Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to display the value instead of null value in a straight table?

Hi Community

I have a straight table in that I am calculating an expression  that will display the count of materiel for all the days started from Sunday to Saturday  as below.

DivisionExpression =aggr(count(materiel),Division)
Atlanta-
New jersey2000
New York523
Texas251
CDC412
Sidney321

Here for my Dimension Division field value Atlanta i am getting a null value so 

here  I want to populate  a value that is calculated for the days Monday to Friday instead of null value for Atlanta.Can someone let me know the possible ways to handle it.

Thanks

12 Replies
Anonymous
Not applicable
Author

you actually want to show a different expression result if the result from your expression is null, right? then did you try an if statement?

something like

=if(isnull(expression1), expression2, expression1)

Not applicable
Author

Do you have value for Atlanta in the sources?

Also please place sample data and app to check ... thanks

Not applicable
Author

Hi Jsaradhi

I Tried but it hasn't taking that expression2 as you suggested.

Thanks

John

Not applicable
Author

Hi Nagaraj Rangaiah

I Have data for Atlanta  but sun day I don't have the data for that I want to display up to Friday data.

Thanks

vishsaggi
Champion III
Champion III

HI John,

Unable to test but just thought this would help you. Please

try to follow the below link that should get you the answer I presume.

--> Answers By Steve Dark and Erico.

ISNULL Script | Qlik Community

anbu1984
Master III
Master III

Can you post sample app

ali_hijazi
Partner - Master II
Partner - Master II

make your expression as such:

sum(aggr(Count(Material),Division))

this will display 0 instead of null

I can walk on water when it freezes
Not applicable
Author

HI,

You can try this,

If(ISNULL(Your field name),Peek(Yourfieldname), Yourfieldname) AS Yourfieldname

This will fetch the last value,Once you have values for every division

Dimension Division field value.


after having values then you might not face any issue.

Thanks

Not applicable
Author

or solve it in your script.

test with if(len(fieldname)=0,....... and set field to 0