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
v_mark
Helper V
Helper V

Last date of the previous month show on a matrix table

Good day, 

 

I am connected through Direct Query and trying to calculate the last date of the previous month for my beginning inventory.  The goal was to get all the tickets open at a specific point in time and the close date is NULL and have it viewed on a matrix table. Like this one below. 

 

Month - Year Begin Inventory #  MTD Inventory #
Jan - 2021?267
Feb - 2021?363
March - 2021?58

 

The sample data set is here 

 

The logic is: 

As of Jan 1st 2021.

Count of all tickets with the status of Open

And the placement date is <=12-31-2020

And the close date is NULL

 

As of Feb 1st 2021.

Count of all tickets with the status of Open

And the placement date is <=01-31-2021

And the close date is NULL

 

As of March 1st 2021.

Count of all tickets with the status of Open

And the placement date is <=02-28-2021

And the close date is NULL

 

Tried to use multiple measurements but it only shows MTD. 

I appreciate all the help 

1 REPLY 1
amitchandak
Super User
Super User

@v_mark , With help from the date table

Try openingbalancemonth -https://dax.guide/openingbalancemonth/

 

Refer to my video how to use: https://www.youtube.com/watch?v=6lzYOXI5wfo

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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.