I have 2 rows of data and I am trying to calculate the percentage by simply divide one to another and have a presentation showing as this input and output? Any suggestions?
Input
Desired Output
Solved! Go to Solution.
Hi @mlozovskaya
Attached is a workflow that includes two different possible ways to accomplish this. Either one could be modified to fit other scenarios you may have in your data. The first method uses a combination of the Cross Tab & Transpose tools while the other method utilizes a Filter + Append Records tool.
Try these out and let me know if you have questions or still need assistance.
Thank you for sharing workflow, I was wondering if there is a shorter way to do it using multi-formula tool
I had an idea! At first I didn't go that route because I was thinking you'd have to do some more manipulation to get the percent on the correct row, but I thought of a faster way to do it with a macro created by @patrick_digan
First, create a blank row under your current data then use the multi-row formula row tool with this expression:
iif(isempty([Column 1]), tostring(tonumber([Row-2:Column 2])/tonumber([Row-1:Column 2])*100) + "%", [Column 2])
@Kenda This is more simple solution, do you know how to add a row label for the new calculated value?
You could add a formula tool to update Column 1 that says
iif(IsEmpty([Column 1]), "Birch Tree %", [Column 1])