Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

expression is not working in straight table? please help


Hi,

I have below expression in straight table

expression 1=IF(ISNULL(Amount)=0,Amount,Amount) --- not working

when I used this the data is not showing in columns. when I used Amount in list box it is showing blanks at the top.

I have used the expression 2 with different column name as below which is working fine.

expression 1=IF(ISNULL(SalesAmount)=0,SalesAmount,SalesAmount)   --- working fine

Only expression 1 is not working.

Please can anyone suggest me is there any wrong in expression 1?

Thanks.

8 Replies
swuehl
MVP
MVP

An expression should be conctructed using aggregations functions like sum() etc.

If you don't do that, your expressions return NULL when there is not a single, unambiguous result.

In your expression, if field Amount has more than one possible values in the context of current selections and dimensions, you won't get a result.

And why are your THEN and ELSE branch identical?

Not applicable
Author

I have tried below not working

=Sum(Amount)

please help me how to change the above expression?

swuehl
MVP
MVP

What do you mean 'not working'?

No result ('-'), zero or wrong result (based on what definition of wrong)?

Have you checked that your values in field Amount are numbers, not text values?

PrashantSangle

Hi,

Try this

Sum(If(len(trim(Amount))=0 or isnull(Amount),Amount,Amount))

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
hariprasadqv
Creator III
Creator III

Hi,

ISNULL returns TRUE or FALSE. Instead of that you can use NULLCOUNT().

Not applicable
Author

Thanks. I found the problem. I have added in script in link table as below

'' as Amount

I believe that caused the problem.

now I removed it and can able to see values in column.

Not applicable
Author

Thanks.

Not applicable
Author

Thanks.