I'm trying to encapsulate the division by 1000000 in a formatting function that I can then"call" in a KPI object.
For instance: in the front-end, I want to show the number21,784,123€as21.8 M€. I have the mask in a SET variable to show the M€ sign, but how can I perform the division in the script and use it in the chart object asNum(SUM(#Sales),vFormatEURMillion) ?
Hi @valpassos, I'm not sure to understand what youa re trying or where you find the issue. Sometines I use a selector to chek if you want values in units, miles or millions, I do taht with a varible vDivisor that can have 1, 1000 or 1000000 as value, and all expressions are divide by this vDivisor variable, maybe you can use something similar.
If you want to do that in script the basis are the same, create a variable with the divisor value an apply that divisor when loading values, doing this on script will requirte a reload to apply changes.