Forum Discussion
RichWyeth
9 years agoFrequent Visitor
Subtract values from different rows
Hi, I have a table that tracks company headcount (Headcount_C) and I also have a Month_Year column and a Rolling_Month column. I would like to know the difference between each month, using eithe...
v-ljerr-msft
9 years agoMicrosoft Employee
Hi RichWyeth,
According to your description, you should be able to use the formula below to create a calculate column in this scenario. (Assume your table is called "Table1".)
Difference =
VAR rm = Table1[Rolling Month]
VAR hc = Table1[Headcount_C]
RETURN
hc
- CALCULATE (
MAX ( Table1[Headcount_C] ),
ALL ( Table1 ),
Table1[Rolling Month]
= rm + 1
)
Regards