cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted

Help with Calendar: I need to mark as False weekends and holidays

Good day and good after noon teachers !!! 1 big hand with a calendar table please!... I need to make holidays "False" in the same column (Workdays)... as you see I have only weekends as False at the moment... any advice according with what I have? (I have to keep it like this with 2 columns "Date" and "Workdays") Thank you in advance community. 

 

WorkDay =
VAR WeekDayNum =
WEEKDAY ( 'Calendar'[Date], 2 )
RETURN
(
IF ( WeekDayNum = 6 || WeekDayNum = 7,,FALSE(),TRUE() ))

 

 

Calendar.JPG

2 ACCEPTED SOLUTIONS

Accepted Solutions
Phil_Seamark Super Contributor
Super Contributor

Re: Help with Calendar: I need to mark as False weekends and holidays

You'll need a data source of holidays.  These will vary from region to region, organisation to organisation.  Once you have the list that is relevant for your reports, import it as a table.  You can then merge the details into a new column in your Date table or extend the logic of your existing column.  

 

 


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Re: Help with Calendar: I need to mark as False weekends and holidays

Hi Phil... I did what you said and this look like this: I made a holiday table then, over my calendar table, I added the holiday column with a "Related column function" ...after that, I added another column with "IF" function as you see in the pic... I think it worked but Im not sure if that if what you meant.

 

Thanks in advance for your feedback.Calendar2.JPG

4 REPLIES 4
Phil_Seamark Super Contributor
Super Contributor

Re: Help with Calendar: I need to mark as False weekends and holidays

You'll need a data source of holidays.  These will vary from region to region, organisation to organisation.  Once you have the list that is relevant for your reports, import it as a table.  You can then merge the details into a new column in your Date table or extend the logic of your existing column.  

 

 


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Re: Help with Calendar: I need to mark as False weekends and holidays

Hi Phil... I did what you said and this look like this: I made a holiday table then, over my calendar table, I added the holiday column with a "Related column function" ...after that, I added another column with "IF" function as you see in the pic... I think it worked but Im not sure if that if what you meant.

 

Thanks in advance for your feedback.Calendar2.JPG

Phil_Seamark Super Contributor
Super Contributor

Re: Help with Calendar: I need to mark as False weekends and holidays

Hi @christianfcbmx

 

It looks good.  But do you want your new column to say True (when it's a weekend or holiday) and False (for everything else) ?

 

If so add this column

 

Is Workday = IF('Calendar'[Workday] || 'Calendar'[Workday (1)],FALSE(),TRUE())

To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Re: Help with Calendar: I need to mark as False weekends and holidays

Vice versa Phil... False when is weekend and holiday and as you can see is done...the logic is very simple ..it is what I needed. Thank you Phil to light my way to the solution!!!!

 

 

 

Imagen1.jpg.

Helpful resources

Announcements
Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Power BI Helps Homeless and Trouble Youth

Power BI Helps Homeless and Trouble Youth

We spoke with Power BI Super User, Greg Deckler, about his charity work

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Users Online
Currently online: 73 members 1,242 guests
Please welcome our newest community members: