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

Get Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.

Reply
ewu
Helper I
Helper I

Seemingly simple Excel task about Mth-to-Mth change, but really need DAX help

ewu_0-1678082193065.png

Really appreciate help - how do I go from the top 2 tables to get the results of the table at the bottom?

Basically it is just a month-to-month change in value, but ... DAX is hard...

Thanks a lot!

1 ACCEPTED SOLUTION
DAXDigger
Regular Visitor

Measure = 
VAR _currentRevenue = CALCULATE(SUM(Customer[Revenue]))
VAR _selectedDate = MAX(Customer[Month])
VAR _prevDate = CALCULATE(MAX(Customer[Month]),Customer[Month]< _selectedDate)
VAR _prevRevenue = CALCULATE(SUM(Customer[Revenue]),ALL(Customer[Month]),Customer[Month]=_prevDate)
RETURN IF(_prevRevenue = 0 ,1, (_currentRevenue - _prevRevenue)/_prevRevenue)

DAXDigger_0-1678088951685.png

 

View solution in original post

2 REPLIES 2
DAXDigger
Regular Visitor

Measure = 
VAR _currentRevenue = CALCULATE(SUM(Customer[Revenue]))
VAR _selectedDate = MAX(Customer[Month])
VAR _prevDate = CALCULATE(MAX(Customer[Month]),Customer[Month]< _selectedDate)
VAR _prevRevenue = CALCULATE(SUM(Customer[Revenue]),ALL(Customer[Month]),Customer[Month]=_prevDate)
RETURN IF(_prevRevenue = 0 ,1, (_currentRevenue - _prevRevenue)/_prevRevenue)

DAXDigger_0-1678088951685.png

 

Thanks so much!

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.