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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to replace null values with numeric value

Hi, 

I'm getting some null values from source column which column having a Number as data type, I want to replace null value with "500" in tMap. I tried with row1.Rate!=null?500:row1.rate but it is throwing the following error.

 

Error Line: 1119
Detail Message: Type mismatch: cannot convert from Number&Comparable<?> to BigDecimal
There may be some other errors caused by JVM compatibility. Make sure your JVM setup is similar to the studio.

 

Kindly advise.

 

Regards,

 

 

Labels (2)
1 Solution

Accepted Solutions
TRF
Champion II
Champion II

Here it is:

row2.rate == null ? new BigDecimal("500") : row2.rate

Hope this helps.

 

View solution in original post

3 Replies
TRF
Champion II
Champion II

Here it is:

row2.rate == null ? new BigDecimal("500") : row2.rate

Hope this helps.

 

Anonymous
Not applicable
Author

Hi,

Did you compare BigDecimal value with null? If so, 500 is an int, you cannot assign it to a BigDecimal column.

Best regards

Sabrina

Anonymous
Not applicable
Author

it is not giving any error but is not replacing with value.