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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

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

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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