4 Replies Latest reply: Sep 20, 2016 6:27 PM by Casey Johnson RSS

    Modifying Currency Field / String question?

    Casey Johnson

      New to Qlik Sense and struggling a bit to understand how to implement scripting. Not sure if it's best practice to modify data in the LOAD, Through the use of variables, or through formulas in the APP???? I'm also really struggling to find examples used in context vs. just finding the script (because it's not clear to me where it goes yet?).


      Regardless, this is what I'm trying to do. The "Est. Retail Value" field below outputs a currency string? (Ex. $450 USD). I'm trying to strip out the "USD" and convert it to a number to be used as a measure. What's the best way to do this? Should I do it in the LOAD editor, or somewhere else? If so, what does that look like?


      I tried the "Replace" option, but that's not working for me.



          "Est. Retail Value",

               Replace('Est. Retail Value','USD','') as "New Retail Value",

          "Item Number",


      FROM [lib://Webfile]

      (txt, utf8, embedded labels, delimiter is ',', msq);