Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
bhaveshp90
Creator III
Creator III

How to convert varchar to float ?

Hello All,

I have a column Risk_Contingency which is varchar. How can I convert this into float, I am also replacing the ',' with ' '.

Below is my SQL query for this

              Convert(float, replace([Risk_Contingency_WBS], ',',''))  as Risk_Contingency,


any help is greatly apprecaiated,


thanks

Bhavesh

1 Solution

Accepted Solutions
vishsaggi
Champion III
Champion III

May be use Num() function like

Num(Trim(replace([Risk_Contingency_WBS], ',','')), '#,##0.00')


What are the values in your RiskContingency field?

View solution in original post

4 Replies
vishsaggi
Champion III
Champion III

So what is the issue with your convert function? Is it not converting to float?

bhaveshp90
Creator III
Creator III
Author

It is converting to float in SQL, but I am trying to write the same logic in QlikView (in my expression)

trdandamudi
Master II
Master II

See if the below link helps...

convert a float field to integer

vishsaggi
Champion III
Champion III

May be use Num() function like

Num(Trim(replace([Risk_Contingency_WBS], ',','')), '#,##0.00')


What are the values in your RiskContingency field?