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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
bsbernabe
Creator
Creator

Suppress when value is null in expression

Hello There,

This is my expression below and i want to suppress when value is null in expression how can i ?

Expression

=if ([Days] <= 365,.10,

    if ([Days] <= 730,.20,

    if ([Days] <= 1095,.30,

    if ([Days] <= 7460,.40,

    if ([Days] < 1825,.50,

    if ([Days]  >= 1825,.60))))))*(VALUE))

Best Regards,

Bing

1 Solution

Accepted Solutions
Anil_Babu_Samineni

Perhaps these? And, Just replace with red context to any one from below list

=if ([Days] <= 365,.10,

    if ([Days] <= 730,.20,

    if ([Days] <= 1095,.30,

    if ([Days] <= 7460,.40,

    if ([Days] < 1825,.50,

    if ([Days]  >= 1825,.60))))))* (If(Len(VALUE)>0,VALUE))

OR

Sum({<VALUE -= {' '}>} VALUE)

OR

Sum({<VALUE -= {' '}>} VALUE)

OR

Sum({$<VALUE -= "=Null()">} VALUE)

OR

If(Not IsNull(VALUE), VALUE)


And even, This works

sum({$<VALUE={"=Len(Trim(VALUE))=0"}>} VALUE)



Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

6 Replies
Anil_Babu_Samineni

Perhaps these? And, Just replace with red context to any one from below list

=if ([Days] <= 365,.10,

    if ([Days] <= 730,.20,

    if ([Days] <= 1095,.30,

    if ([Days] <= 7460,.40,

    if ([Days] < 1825,.50,

    if ([Days]  >= 1825,.60))))))* (If(Len(VALUE)>0,VALUE))

OR

Sum({<VALUE -= {' '}>} VALUE)

OR

Sum({<VALUE -= {' '}>} VALUE)

OR

Sum({$<VALUE -= "=Null()">} VALUE)

OR

If(Not IsNull(VALUE), VALUE)


And even, This works

sum({$<VALUE={"=Len(Trim(VALUE))=0"}>} VALUE)



Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
prma7799
Master III
Master III

For this

Sum({$<VALUE -= "=Null()">} VALUE)

And even, This works

sum({$<VALUE={"=Len(Trim(VALUE))=0"}>} VALUE)

Sum({$<VALUE -= {"=Null()"}>} VALUE)



sum({$<VALUE-={"=Len(Trim(VALUE))=0"}>} VALUE)

bsbernabe
Creator
Creator
Author

Hi Anil,

Thank you so much for your support, your expression is workings

Highly Appreciated.

Best Regards,

Bing

bsbernabe
Creator
Creator
Author

Hi PM,

Thank for your Support.

Best Regards,

BIng

prma7799
Master III
Master III

If this is helpful to you then please mark this reply as helpful it is helpful to others

Anil_Babu_Samineni

I believe First one should work, But in syntax it may shows wing error in red area of null. That is bug (It may work)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful