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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Previous month but something is off

Hi Power BI Community!
 
I want to show the last completed month. I tried these formulars. The first comes very close but it shows not the last month at the beginning.
 
Previous month = CALCULATE([Count of delivery note], PREVIOUSMONTH(Dates[Date]))

Last months = CALCULATE(COUNT(TrackET[Delivery note])+0, DATESINPERIOD(Dates[Date2], MAX(Dates[Date2]), -1, MONTH))
 
 

 

 

 

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , what is the issue ? the first formula and one I am sharing should work with a date table. Marked as date Table. Make sure Date table is Marked as date Table

 

 

Previous month = CALCULATE([Count of delivery note] , PREVIOUSMONTH(Dates[Date]))

 

last MTD (complete) Sales = CALCULATE(SUM([Count of delivery note] ,DATESMTD(ENDOFMONTH(dateadd('Date'[Date],-1,MONTH))))

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , what is the issue ? the first formula and one I am sharing should work with a date table. Marked as date Table. Make sure Date table is Marked as date Table

 

 

Previous month = CALCULATE([Count of delivery note] , PREVIOUSMONTH(Dates[Date]))

 

last MTD (complete) Sales = CALCULATE(SUM([Count of delivery note] ,DATESMTD(ENDOFMONTH(dateadd('Date'[Date],-1,MONTH))))

Anonymous
Not applicable

Thanks now it works!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.