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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
Anonymous
Not applicable

Stuck getting the right Holidays For my Calender Table

Hello,

 

I am having trouble figuring out how to get the right Holidays in my DAX Calender Table. I can get the Holidays just fine but can't figure out how to do this. I need to make the holidays actualy fall on Friday if the holiday was on Saturday or a Monday if the holiday was on a Sunday.

 

I was wonderng if anyone could help me out with this?

 

Thanks

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi,

 

You can create a new calculated column name: "Revised Holiday" with formula:

Revised Holiday 
= IF(WEEKDAY('Date'[Date],1) = 1, 
                                 NEXTDAY('Date'[Date]),
   IF(WEEKDAY('Date'[Date],1) = 7, 
                                 PREVIOUSDAY('Date'[Date]),
                                 'Date'[Date]))

I hope this help.

View solution in original post

4 REPLIES 4
Greg_Deckler
Super User
Super User

Can you supply sample data on your holidays?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Here is a picture of the Holidays:

 

holidays_pic.png

Anonymous
Not applicable

Hi,

 

You can create a new calculated column name: "Revised Holiday" with formula:

Revised Holiday 
= IF(WEEKDAY('Date'[Date],1) = 1, 
                                 NEXTDAY('Date'[Date]),
   IF(WEEKDAY('Date'[Date],1) = 7, 
                                 PREVIOUSDAY('Date'[Date]),
                                 'Date'[Date]))

I hope this help.

Anonymous
Not applicable

Thank you very much!

Helpful resources

Announcements
May PBI 25 Carousel

Power BI Monthly Update - May 2025

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

May 2025 Monthly Update

Fabric Community Update - May 2025

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