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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to Convert string field to Decimal

Hi Folks,

 

I want to do some sum operation on the  field called CHG_AMT. 

 

I am executing below logic,

row1.CHG_CLASS == "OCC" &&
(row1.CHG_DESC_1 == "Late Payment Charge" ||
row1.CHG_DESC_1 == "Late Charge on Past Due Balances" ||
row1.CHG_DESC_1 == "Late Fee" ||
row1.CHG_DESC_1 == "Finance Charge" ||
row1.CHG_DESC_1 == "Late Payment Interest" ||
row1.CHG_DESC_1 == "Late payment charge on unpaid balance") ?
sum(row1.CHG_AMT) : 0

 

The error I am facing is with data type of CHG_AMT in  the input.

 

So how do I convert this to Decimal and do Sum operation?

 

Any help is appreciated.

 

Thanks

Deepak

Labels (3)
12 Replies
manodwhb
Champion II
Champion II

ok,then you can use tConvertType or Double.parseDouble() in tmap to convert.

manodwhb
Champion II
Champion II

@Deepak1,did it help you?

manodwhb
Champion II
Champion II

@Deepak1,still do you have issue with this?