Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Sierrea
Contributor
Contributor

If(Len)

Hi I am trying to use this expression if(Len([LOB_Lapse_Date])>0,([REN_RTO_DNM_SYP]-[REN_RTO_NMR_SYP]),0). It is returning the zeros, but not the numbers for the portion I need substracted.  Any help would be greatly appreciated.  

Labels (1)
3 Replies
Or
MVP
MVP

It is difficult to try and help without knowing what the values of those fields are.

You could try debugging this by splitting this into two expressions - Len(Field) and (Field1-Field2) - and seeing if each one returns the expected value individually.

albertovarela
Partner - Specialist
Partner - Specialist

Make sure [REN_RTO_DNM_SYP] and [REN_RTO_NMR_SYP] are numeric values otherwise the subtraction won't work. You may rely on these functions: 

 IsNum(Field) to evaluate if it's a number or not

Num#(Field)  to take the textual representation of the input expression and generate a number

Sierrea
Contributor
Contributor
Author

Thank  you by breaking it up I was able to figure out I need to put the sum function and lose the brackets!  Then it returned my values! Thanks again!

if(Len([Account_Lapse_Date])>0,sum(REN_RTO_DNM_SYP-REN_RTO_NMR_SYP),0)