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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to compare value of BigDecimal with a integer in tMap

Hello,
Please teach me!
What i wanna do is following.
When creating comparison sentence in Expression Builder
for compare both values.
Then this error has occur and displayed massage like
it is different type of value that Bigdecimal and Integer.
comparison sentence i wrote is following.
/row1.amount != 0
row1.amount is Bigdecimal.
How can I compare these values?
Thanks!
Regards,
Labels (2)
4 Replies
Anonymous
Not applicable
Author

tak a look at java documentation.
Anonymous
Not applicable
Author

Hi,
row1.amount!=new BigDecimal(0). But you should the syntaxe row1.amount.compareTo(new BigDecimal(0))? new BigDecimal(0) (it s equal) : (not equal)
Anonymous
Not applicable
Author

Hi,
I don't know what you exactly want to do, but you can also write like below...
row1.amount != BigDecimal.valueOf(0)
So, if you use it in expression builder, you probably would like to make a logical comprasion. for that;
row1.amount != BigDecimal.valueOf(0) ? do x : do y
_AnonymousUser
Specialist III
Specialist III

First convert BigDecimal tparam to integer in Expression Builder.
For Example : row1.ID.intValue() >= 2? "Y" : "N";