I need to use the num function to format a number, but the number of digits
after the comma is dynamic according to a column
What do you mean? Would you be able to show an example?
Please share some sample
if(NB=3, num(...,'FORMAT1'), if(NB=2, num(...,'FORMAT2'), num(...,'FORMAT3')
Hello youssef , i need to test this format in load script
yes you can do it like this on the script.
Sorry this method didn't works for me on the script, as soon as I found a solution I'll let you know
num(YOUR_COLUMN,if(match(NB,'3'),'FORMAT1',if(match(NB,'2'),'FORMAT2','FORMAT3'))) as ...
What about something like this?
The results might depend on what type of chart you're plannig to use the expression, works for me in a pivot table.
Num([CH] ,'#.##0,' & Repeat('0', [NB]))
Do you also want to round the number to the specified decimal places or just format (i.e. keep the underlying value unchanged)?
Retrieving data ...