Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi ,
How to convert text to numbers in Qlik sense. Values are coming at left side in column. when tried to export and sum it is not allowing to sum.
Tried below function but still not working.
num(num#( QTY , '#.###', ',' , '.')) AS QTY
Thank You,
Rupali
Hi @rupaliqlik ,
I will suggest you to just use
num#(QTY) as QTY in the script and rather than using formatting at expression level use custom number formatting from properties.
Hope this solve your issue.
Hi @rupaliqlik ,
I will suggest you to just use
num#(QTY) as QTY in the script and rather than using formatting at expression level use custom number formatting from properties.
Hope this solve your issue.
Yes I also tried using num() and it didn't work, but num#() did. Don't really understand why and it doesn't seem intuitive to me, but at least I got it working now.
It is obvious if you study what each of those functions do:
num - it is formatting function. it applies number mask/format on numerical value. It expects input value to be number and it applies a mask on that number: https://help.qlik.com/en-US/qlikview/May2023/Subsystems/Client/Content/QV_QlikView/Scripting/Formatt...
num# - it is interpretation function. It expects input to be a string in certain format and it will convert it to a numerical representation: https://help.qlik.com/en-US/qlikview/May2023/Subsystems/Client/Content/QV_QlikView/Scripting/Interpr...
I encourage going through documentation when using functions so I can make educated and right decision on which function to use in which scenario.
Similar functions apply to Dates, Time, Timestamp, Money etc.. data types presented as numbers or text.
Hope that clarifies why one of the function works and why other didnt in your case.
cheers