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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

Delayed month end

Folks: 

 

I am a big fan of the Relative Date Slicer in Power BI.  Financially - we report monthly.  The majority of my reports use a Last 36 Months (Calendar) - and this works great.  As I write this - my slice is 3/1/2016 - 2/28/2019.  Just what I want. 

 

My problem is - that window will change with the calendar.   On the first of April - the dates the slicer uses will be 4/1/2016 - 3/31/2019.  We have a processing cycle that takes about three or four business days to complete.   So the calendar may say it is April - but that does not inply we are done with March.  We typically are not ready for this switch until the 6th or 7th.

 

I can write a DAX function that would know the last certified date.  I can also put a certified attribute on my Date dimension. 

 

Does anyone have any ideas on how I can delay the transition?

 

    

1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@Anonymous I think you can achieve this by adding new colum in date dimension for "Month Offset" whcih will use certify date and then use that offset column to see last 6 months data. You will not require relative date filtering in that case.

 

Assuming you have table called certified date and add following new column in your date dimension.

 

Month Offset = 
VAR __cDate = MAX( 'Certified Date'[Certified Date] )
VAR __date = IF( ISBLANK( __cDate ), TODAY(), __cDate )
RETURN
DateDiff( __date, 'Date'[Date], month )

And on filter you can use something like this, you can make changes as per your need, but it give you an idea how you can use own relative filtering instead of in-built relative date filtering.

 

image.png



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

1 REPLY 1
parry2k
Super User
Super User

@Anonymous I think you can achieve this by adding new colum in date dimension for "Month Offset" whcih will use certify date and then use that offset column to see last 6 months data. You will not require relative date filtering in that case.

 

Assuming you have table called certified date and add following new column in your date dimension.

 

Month Offset = 
VAR __cDate = MAX( 'Certified Date'[Certified Date] )
VAR __date = IF( ISBLANK( __cDate ), TODAY(), __cDate )
RETURN
DateDiff( __date, 'Date'[Date], month )

And on filter you can use something like this, you can make changes as per your need, but it give you an idea how you can use own relative filtering instead of in-built relative date filtering.

 

image.png



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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