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

Announcements
Note: You may notice some temporary visual or styling issues in the Community. Our vendor is actively investigating.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Expression in Qlik sense

I have "Raw Materials" and "Other Raw Materials" in one column. and I use this two expressions to calculate the raw and other raw materials:

if(Left (Item_No04,3) <> 'RAW',sum(Quantity_Shipped04))  this expression is working fine.

if(Left (Item_No04,3) = 'RAW',sum(Quantity_Shipped04)) but this expression give me null value!!.

there is any other expression give me accurate values?!

thanks.

1 Solution

Accepted Solutions
Kushal_Chawda

try this

=sum({<Item_No04={"*Raw*"}>}Quantity_Shipped04)

View solution in original post

4 Replies
Chanty4u
MVP
MVP

Len(Trim()) will work for NULLs as well as blanks. So if you use Len(Trim()), you do not need IsNull() as well.

IsNull() works with NULLs but not blanks.

Kushal_Chawda

try this

=sum({<Item_No04={"*Raw*"}>}Quantity_Shipped04)

Chanty4u
MVP
MVP

If( Len(Trim(Field))=0 or Isnull(Field) , this, that) as FieldName


avinashelite

I think you might not have the values that's start like RAW i.e. you checking for the first 3 letters...did you check your data ??