Hi,
I need to calculate % of the total and report it out. However the sum of it doesn't total to 100. It is either > or < 100. Can someone help me how i can fix this?
Have attached my workflow for your reference.
Thanks!
Sorry, I am confused. I get my output as 100.00 in Sum_% of total column. That is what you too are looking for, correct?
In order to get 100 and not 100.03 as your output:
Screenshot of my final output.
I hope this helps. Reattaching my solution for your reference.
Hi @hash_89, convert the numerical columns into Double datatype and then do the computation. The final result comes out to be 100 in this case, after which you can convert it to fixed decimal with two decimal places if that's how you want your output to look like.
I have attached a modified version of your file for your reference.
Thanks for your response. I tried converting it back to fixed decimal with two decimal places, but still the total comes to 100.3.
The differences are due to rounding - I noticed you're using a fixed decimal with two decimal places as your data type and also rounding to two decimal places in your formula. Try expanding the number of decimal places. I expanded it to a fixed decimal of 26 digits with 10 decimal places and am seeing a total of 100%. See attached.
The difference between the different types of numeric formats is the level of precision. This can affect your overall outcome.
https://help.alteryx.com/current/Reference/DataFieldType.htm