2 Replies Latest reply: Nov 5, 2012 7:41 AM by Magdalena Tammegger RSS

    Variable with coma or point



      I have a problem with comas and points. I want to declare a couple of variable like this:

      [OG_GH] = 0.505

      [UG_GH] = 0.296


      And then I want to use these variables in a expression.



      Avg ({<Z1V1niO={'>$([UG_GH])'}>*<Z1V1niO={'<$([OG_GH])'}>}[Z1V1niO])


      The problem is that in "expression" I need "," and in Skript ".".


      What can I do?


      Thank you for your help!!!



        • Re: Variable with coma or point
          Diego Fernando Caivano

          Hi. If you treat your variables as text, then you should use REPLACE() function. If you are evaluating those values as numbers, use the NUM() and NUM#() functions with the appropiate decimal separators.


          To convert the given example, you first need to interpret the dot and then switch it to comma:

          NUM(NUM#([OG_GH], '#,##0.0', '.', ','), '#.##0,0', ',', '.')


          Hope it helps.

          • Re: Variable with coma or point

            you can try out the replace function in set analysis.


            replace('0.505','.',',') -> 0,505


            i don't have any data where i could test it right now but I think it should work this way