Forum Discussion
Kolumam
8 years agoPost Prodigy
Assistance with Calculation
Hi All, As you can see from the pic that the size increases every month. How do I display the difference in size as well ? For example : For the month of Feb , instead...
Anonymous
8 years agoNot applicable
SumHeadcount = VAR CurrentMonth LASTDATE('YourTable'[Date])
VAR LastMonthNum = if(Month(CurrentMonth) = 1, 12, MONTH(CurrentMonth) - 1)
VAR LastMonth = if(Month(CurrentMonth) = 1, DATE(YEAR(CurrentMonth]) - 1, LastMonthNum, 1), DATE(YEAR(Date]), LastMonthNum, 1))
RETURN
SUM('YourTable'[ValueField]) - CALCULATE(
SUM('YourTable'[ValueField]),
ALL('YourTable')
'YourTable'[Date] = LastMonth
)This might do it, just put it on something with Month Context. This assumes your 'date' fields are done in a way that each date aligns to a single date within a month, like the first.