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

Last month calculation got wrong result when show by daily

Dear Team,

I would like to seek support from team, I am facing calculation of last month and got imporper result when show by dialy.

calculate MtdAct:  CALCULATE(sum(SaleInvMovement[SaleAmt_Amt]),DATESMTD('Date'[Date]))

calulate LM_MtdAct: CALCULATE(MeasureTable[MtdAct],DATEADD('Date'[Date],-1,MONTH))

 

Result.JPG

 I am apreciated for help. Thanks

LC Aynar

2 REPLIES 2
JFAR49ER
Frequent Visitor

Hi, 

Could you possibly use measure branching for this? 
I.e Calc Last Month MTDAct = CALCULATE([MtdAct], PREVIOUSMONTH('Date'[Date]))

PREVIOUSMONTH : Returns a table that contains a column of all dates from the previous month, based on the first date in the Dates column, in the current context. 
https://learn.microsoft.com/en-us/dax/previousmonth-function-dax
So your measure for this month is called in and then the filter is MTD but previous month.

Let me know if this works? Hope its helpful 🙂

 

Anonymous
Not applicable

Hi @JFAR49ER ,

 

Thanks your for your prompt help, however, the result is still improper figure stated below:

LM_MTDAct_new = CALCULATE(MeasureTable[MtdAct] ,PREVIOUSMONTH('Date'[Date]))
 
New result.JPG
 
I am appreciated for any solution. Thanks!
LCAynar

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.