Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Kolumam
Post Prodigy
Post Prodigy

Assistance with Calculation

 

Capture.PNG

 

 

 

 

 

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 of 16.74 it should show 14.78+1.96.

 

Kindly help.

3 REPLIES 3
v-huizhn-msft
Microsoft Employee
Microsoft Employee

Hi @Kolumam,

Have you resolved your issue? If you have, please mark the right/helpful reply as answer. More people will new things here. If you haven't, please feel free to ask.

Best Regards,
Angelia

Anonymous
Not 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.

 

Anonymous
Not applicable

I wrote something like this for another post.  Not the only way to do this, but it was the first way that came to mind:

 

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

CALCULATE(
	SUM('YourTable'[ValueField]),
	ALL('YourTable')
	'YourTable'[Date] >= LastMonth,
	'YourTable'[Date] <= CurrentMonth
)

 EDIT:  The code above doesnt do exactly your thing, but it might give you something to work from

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors