cancel
Showing results for 
Search instead for 
Did you mean: 
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
T-Shirt Design Challenge 2023

Power BI T-Shirt Design Challenge 2023

Submit your creative T-shirt design ideas starting March 7 through March 21, 2023.

March 2023 Update3

Power BI March 2023 Update

Find out more about the March 2023 update.

March Events 2023A

March 2023 Events

Find out more about the online and in person events happening in March!

Top Solution Authors