Forum Discussion
Subtract columns
- 5 years ago
It looks like you are trying to create a calculated measure. You need to do this as a COLUMN.
See attached pbix file below signature for reference on what I have done.
Hey Alison,
Thanks for the reply. In my actual data there are thousands of rows (account number) each day, I skipped some months in my dummy example. Each account number shows the cumulative ammount, so every month gets bigger and bigger BUT there are also some months that they remain the same (i.e. they don't move).
Let me give you another example,
- AllisonKennedy5 years agoCommunity ChampionTry something like this:
Change = CumulativeTotals[Value] - MAXX(FILTER(ALL(CumulativeTotals),EARLIER(CumulativeTotals[Date])>CumulativeTotals[Date] && CumulativeTotals[Account Number] = EARLIER(CumulativeTotals[Account Number])),CumulativeTotals[Value])- Anonymous5 years agoNot applicable
I got this type of error,
"A single value for column 'CumulativeTotal' in table 'Merge' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result."
Any ideas or suggestions?
- AllisonKennedy5 years agoCommunity ChampionYou need to do this as a calculated COLUMN in the same Merge table. The formula I suggested will not work as a measure because of the way the EARLIER function is used.