Hello,
I was wondering what would be the best way to round Numbers rounded to 2 decimals with a comma as separator.
I've tried several combination
For Example I have here is what I have, and the output I need
Total | output |
-69.180000000000007 | -69,18 |
588.95000000000005 | 588,95 |
To round to 2 Decimals, I change the data type to FixedDacimal (19.2), but then I can't replace the ". "with a ","
Even if I use the formula ToNumber(REGEX_Replace(ToString([Year],2), ".", ",")) it outputs me .00
as a decimal everywhere.
I tried also to check the "Use comma as decimal separator" in the select tool but it just output me a Null Value where I had decimals before
One way I found is in 3 step (without changinf the data types)
- ToString(ToNumber([Year]), 2,1)
- ReplaceChar([Year], ",", "")
- ReplaceChar([Year], ".", ",")
But I guess there is a much better way to deal with this ?
Thanks!
Solved! Go to Solution.
toString([your number],2,0,”,”)
will return 1234,45
replacing the 0 with a 1 gets you
1.234.45
my quote symbols may be wrong because of my phone.
Cheers,
mark
Thanks for the reply @MarqueeCrew
But it doesn't rounds my numbers to 2 decimals, or at least not all of them
Actually it's not an issue anymore. I found out that when I output to excel, I'll get the commas, even if Alteryx shows a dot as decimals separator (If I change the data type to Double before that)
Thanks @MarqueeCrew !
User | Count |
---|---|
19 | |
15 | |
15 | |
9 | |
8 |