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

Create a Date table with last Saturday of each Month as month end/Quarter End

Hi,

 

I am looking to create a Date table with which I can organise my Data by Fiscal Year dates.

 

Our month end/quarter ends are the last Saturday of each month

 

Please can anyone advise how to put this together?

 

Thanks

 

Chris

4 REPLIES 4
v-xuding-msft
Community Support
Community Support

Hi @Anonymous ,

I think the blogs can help you.

Create a Date Dimension in Power BI in 4 Steps – Step 1: Calendar Columns 

Create a Date Dimension in Power BI in 4 Steps – Step 2: Fiscal Columns 

Create a Date Dimension in Power BI in 4 Steps – Step 3: Public Holidays 

 

Best Regards,

Xue Ding

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
camargos88
Community Champion
Community Champion

Hi @Anonymous ,

 

Try this calculated table:

 

Last Saturday =
VAR _date = 'Date'[Date]
VAR _LastSaturday = CALCULATE(MAX('Date'[Date]); FILTER(ALL('Date'); YEAR('Date'[Date]) = YEAR(_date) && MONTH( 'Date'[Date]) = MONTH(_date) && WEEKDAY('Date'[Date]) = 7))
RETURN IF(_date = _LastSaturday; 1; 0)
 
Ricardo


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Mariusz
Community Champion
Community Champion

Hi @Anonymous 

 

You can add the below Column, it will return True for the last Sunday of the Month, also if you are looking to return the last Sunday of every Quarter just replace Year Month with Year Quarter column in ALLEXEPT.

Column = 
VAR __lastSunDate =
    CALCULATE(
        MAX( 'Calendar'[Date] ),
        ALLEXCEPT( 'Calendar', 'Calendar'[Year Month] ),
        'Calendar'[Day of Week] = "Sun"
    )
RETURN 
__lastSunDate = 'Calendar'[Date]

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn

 

Anonymous
Not applicable

Hi Mariusz,

 

Thanks for this, I now have a column which returns True on the last date of each Month/Quarter as you have described.

 

PLease can you advise how I can now sort my Date Table using this, to differentiate between Quarters, using the True/False Column you have kindly provided?

 

The desired outcome here is to have my Date table organised by a column Formatted as Q1,Q2,Q3,Q4 - and each quarter ending on the last Sat of each quarter?

 

Thanks in advance,

 

Chris

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.