Gauri Shanker Posted March 10, 2021 Share Posted March 10, 2021 I have a cross table like this ID Actual Expected 411 25500 26400 412 13000 10000 413 5500 8900 414 52520 77000 415 66880 41000 I need to create a new column that calculates the % difference between Actual and Expected. My expected output: ID Actual Expected % diff 411 25500 26400 3.53% 412 13000 10000 -23.08% 413 5500 8900 61.82% 414 52520 77000 46.61% 415 66880 41000 -38.70% How can i write this in custom expression Thanks. Link to comment Share on other sites More sharing options...
Kirsten Smith (she/her) Posted March 10, 2021 Share Posted March 10, 2021 Try something like: Sum([Actual]) / (Sum([Expected]) - Sum([Actual])) * 100 as [%diff] Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now