I have two issues as the following
1. I have used the formula below to calculate tax percentage. (Data Type: V_WString, Size 4). However, the result is inconsistent. As you can see from the screen shot below, row 10 and row 11 both did the calculation, but in a inconsistent format. I'd like something to show as either 7.74% or 0.0774. Either format will be fine, but I'd like to have consistency across the file.
[Sales Tax Amt]/[Sum_Line Item Amount]
2. In Customer column below, I'd like to move the leading zeros. I used formula below to Trimleft, but I received an error message that I am not sure how to fix.
Any help will be appreciated. Thank you!!
Solved! Go to Solution.
Hi @Kshen
For the first item, is there a reason you're using a string datatype? Try making it a double to rule out any quirks around data types.
For the second, you need to give the new field you're calculating a name. In the top left of the formula screenshot you can do this where it says "select a column "
Hey @Kshen. Are you able to share the bit of the workflow you're struggling with? That first one is very odd. I suggest you output to a numerical field type (float, double or fixed decimal). And your formula is correct in the second one. Perhaps you have an extra empty calculation that's throwing an error.
As I say, can certainly help if you share the workflow.
Thank you all for the prompt response! For #1 above, I changed to double and it resolved the problem. The only question I have left is how can I limit number of digit after decimal points? Currently, Alteryx rounded the number into the nearest 6 decimal points. I'd like to change it to 3. See screen shots below
For #2 above, once I added a new column and trim left, it worked!
Thank you for the prompt response! For #1 above, I changed to double and it resolved the problem. The only question I have left is how can I limit number of digit after decimal points? Currently, Alteryx rounded the number into the nearest 6 decimal points. I'd like to change it to 3. See screen shots below
For #2 above, once I added a new column and trim left, it worked!
Hi @PhilipMannering, Thank you for your response!
I changed data type to Double and it worked for item #1.
For item #2, unsure if there is any other way, but I created one new role for the Trimleft, it worked! Now the workflow is showing as below
Round([Sales Tax Amt]/[Sum_Line Item Amount].0.001)
Thank you!!