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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
krkumar2
Frequent Visitor

Compare with previous month within quarter

I  have cummulative aggregate within the quarter

 

krkumar2_0-1663788041712.png

 

I want to calculate Revnue for specific month

 

krkumar2_1-1663788167158.png

 

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @krkumar2 ,

I created some data:

vyangliumsft_0-1663826902765.png

Here are the steps you can follow:

1. Create calculated column.

cummuluative =
SUMX(FILTER(ALL('Table'),YEAR('Table'[Date])=YEAR(EARLIER('Table'[Date]))&&MONTH('Table'[Date])=MONTH(EARLIER('Table'[Date]))),[Amount])
Revenue =
SUMX(FILTER(ALL('Table'),'Table'[Year-Qtr]=EARLIER('Table'[Year-Qtr])&&'Table'[Month]=EARLIER('Table'[Month])),[Amount])
-
SUMX(FILTER(ALL('Table'),'Table'[Year-Qtr]=EARLIER('Table'[Year-Qtr])&&'Table'[Month]=EARLIER('Table'[Month])-1),[Amount])

2. Result:

vyangliumsft_1-1663826902768.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi  @krkumar2 ,

I created some data:

vyangliumsft_0-1663826902765.png

Here are the steps you can follow:

1. Create calculated column.

cummuluative =
SUMX(FILTER(ALL('Table'),YEAR('Table'[Date])=YEAR(EARLIER('Table'[Date]))&&MONTH('Table'[Date])=MONTH(EARLIER('Table'[Date]))),[Amount])
Revenue =
SUMX(FILTER(ALL('Table'),'Table'[Year-Qtr]=EARLIER('Table'[Year-Qtr])&&'Table'[Month]=EARLIER('Table'[Month])),[Amount])
-
SUMX(FILTER(ALL('Table'),'Table'[Year-Qtr]=EARLIER('Table'[Year-Qtr])&&'Table'[Month]=EARLIER('Table'[Month])-1),[Amount])

2. Result:

vyangliumsft_1-1663826902768.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

Thanks Liu , but it is giving me error

krkumar2_1-1664905539338.png

 

 

Greg_Deckler
Community Champion
Community Champion

@krkumar2 Maybe:

Calculation Column = 
  VAR __YearQtr = [Year-Qtr]
  VAR __Month = [Month]
  VAR __Previous = MAXX(FILTER('Table',[Year-Qtr] = __YearQtr && [Month] = __Month - 1),[Monthly]) + 0
RETURN
  __Previous + [Monthly]  


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.