greyangel23
New Member
- Joined
- Apr 23, 2024
- Messages
- 2
- Office Version
- 365
- Platform
- Windows
I have to cells labeled Month1 and month 2. Month 1 and month 2 are columns in my power query. What I need to do is create a custom column that subtracts month 1 from month 2, however I do not know how to make the column names variable in M code. Below is what I want to happen but obviously this isn't working.
= Table.AddColumn(#"Changed Type", "Custom", each [Month2]-[Month1])
= Table.AddColumn(#"Changed Type", "Custom", each [Month2]-[Month1])