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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Aravind24
Frequent Visitor

Need help: DAX Previous Month Comparison

Hi All,

 

I am trying to compare the Month on Month comparison for the year 2024. However my datasource has data from 2023. Dye to whichm Jan'24 is comparing value with Dec'23. I dont need Jan'24 comparison with Dec'23. Kindly help. I use date table.

 

Requesting to kindly help with excluding the comparison for Dec'23. 

Query:

SAAS_OPS_Inflow_MOM =
CALCULATE([SAAS_OPS_Overall_Inflow],
PREVIOUSMONTH('Date'[Date]), REMOVEFILTERS('Date'))
 
Output:
 
Aravind24_0-1714041343800.png

 

6 REPLIES 6
Uzi2019
Super User
Super User

Hi @Aravind24 

What should be expected output?
can you share via excel screenshot for better understanding.

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Hi @Aravind24 

I dont understand why you are getting 20 in all values as i dont know the your modeling. As you can see in my screnshot i am getting correct result what you are expecting. 

 

I just connect my date filed with Calendar date table. and I also created month year column which is date data type

 

Please check your modeling.

 

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!
Uzi2019
Super User
Super User

Hi @Aravind24 
If you want only 2024 years data then use this dax as Measure

Previous Month =
CALCULATE(SUM(Lumix[Clicks]),DATEADD('Calendar'[Date],-1,MONTH), YEAR('Calendar'[Date])=YEAR(TODAY()))
 

Uzi2019_0-1714042916243.png

 

I hope I answered your question!

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Hello Thanks for the quick response.

 

Its not working.

 

SAAS_OPS_Inflow_MOM =
CALCULATE([SAAS_OPS_Overall_Inflow],
DATEADD('Date'[Date], -1, MONTH), YEAR('Date'[Date]) =YEAR(TODAY()))
 
Its unable to get the value for previous year only
Aravind24_0-1714044346951.png

 

Aravind24
Frequent Visitor

@Ritaf1983  @DU  @mussaenda  -- please help experts 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.