cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

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
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors