Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
ena1309
Contributor III
Contributor III

Computed Field

Hi guys,

I am having big trouble recreating this TABLEAU computed field in Qlik, 
please help


IF(LEFT([Quantity],1)<>"0") THEN (FLOAT(REPLACE(TRIM([Quantity]),".",""))) ELSE (FLOAT(TRIM([Quantity]))) END

 

Thank you in advance
Ena

Labels (1)
1 Solution

Accepted Solutions
Andrei_Cusnir
Specialist
Specialist

Hello,

 

Perhaps you can try this expression:

 

if(
 NOT LEFT( [Quantity] , 1 ) = '0'
 Num(Replace(TRIM( [Quantity]), '.', '')), 
 Num(TRIM([Quantity]))
)

 

I hope that this information was helpful. In case I have misunderstood the use case scenario, please elaborate in details by providing additional information. However, if it has helped you resolve the issue, addressed your concerns or at least pointed you in the right direction, please mark it as Accepted Solution to give further visibility to other community members. 
 

Help users find answers! Don't forget to mark a solution that worked for you! 🙂

View solution in original post

1 Reply
Andrei_Cusnir
Specialist
Specialist

Hello,

 

Perhaps you can try this expression:

 

if(
 NOT LEFT( [Quantity] , 1 ) = '0'
 Num(Replace(TRIM( [Quantity]), '.', '')), 
 Num(TRIM([Quantity]))
)

 

I hope that this information was helpful. In case I have misunderstood the use case scenario, please elaborate in details by providing additional information. However, if it has helped you resolve the issue, addressed your concerns or at least pointed you in the right direction, please mark it as Accepted Solution to give further visibility to other community members. 
 

Help users find answers! Don't forget to mark a solution that worked for you! 🙂