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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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