Forum Discussion
How to calculate difference between two columns - related column and count column
I'm struggling with this. I want to create a column that calculates the difference of (First RequiredShiftA) and (CountDuringShiftA) columns.
This started as two tables. I created new columns in my larger table to add the related columns of the required roles, shift a, and shift b thinking that once they were in the same table it would be easy to just subtract one column from the other - nope.
11 Replies
- ibarrau
Super User
Hi. I think I might me missing something. Did you try creating a new calculated dax column on the big table with the following formula?
Table[Column1] - Table[Column2]
Regards
- AnonymousNot applicable
I did try that but the results are no where near correct.
- AnonymousNot applicable
For example, using that formula:
instead of 2 - 2 = 0
I am getting -6
So I'm not exactly sure what is being calculated
- ibarrau
Super User
Are you sure you are checking the result in the data view?
2 - 2 = 6 sounds like having the visualization with a value of SUM of calculatedColumn.
Can you show a picture with the two columns and the substract result from the DataView?