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

View all the Fabric Data Days sessions on demand. View schedule

Reply
MartiX
Regular Visitor

Calculate and previousmonth

Hi, I have table with Date, Customers, Value, and what I need is to get diffrence of Value from previous month.

To get the value from previous month I was trying create Measure like that:

last month value = CALCULATE(sum(Table1[Value]),PREVIOUSMONTH(Table1[Date].[Date]))

But it's not working for me.
I have test measure liek these:

Total Value = sum(Table1[Value])

and these:

previous Month = PREVIOUSMONTH(Table1[Date])

And the last two measures are working for me, the last one it's returnign date with month before - which is correct, but as soon as I'll put them togather in to calculaton formula, I'm getting nothing, blank table with not data.

Waht I'm doing wrong?

1 ACCEPTED SOLUTION
v-haibl-msft
Microsoft Employee
Microsoft Employee

@MartiX

 

You can create a calendar table with DAX and make relationship between the CalendarTable and Table1, then drag the measure into Table visual to see the results.

 

Calculate and previousmonth_1.jpg

 

Best Regards,
Herbert

View solution in original post

2 REPLIES 2
v-haibl-msft
Microsoft Employee
Microsoft Employee

@MartiX

 

You can create a calendar table with DAX and make relationship between the CalendarTable and Table1, then drag the measure into Table visual to see the results.

 

Calculate and previousmonth_1.jpg

 

Best Regards,
Herbert

Great, that works for me!

Thanks a lot.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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