cancel
Showing results for 
Search instead for 
Did you mean: 
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






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






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
collabdays lisbon

CollabDays Lisbon - 26 November 2022

Sessions include practical, hands-on experience that will help you take the next step in your career and know-how.

Difinity Conference

Difinity Conference 2022

Difinity is the largest Microsoft Data, AI, Power BI, Power Platform and Business Applications Conference in New Zealand.

European Share Point Conference

European Share Point Conference

This conference returns live and in-person in Copenhagen this 28 November-01 December with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Microsoft 365 Conference â__ December 6-8, 2022

Microsoft 365 Conference - 06-08 December

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.