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
Milozebre
Helper V
Helper V

Working days and holidays

Hello Community, 

 

I have a question about wokring days. 

Before you send me links here, i read it and thats why i post this question. 

I read the page of Alberto Ferrari : http://sqlblog.com/blogs/alberto_ferrari/archive/2011/01/19/working-days-computation-in-powerpivot.a...

 

After that, I create a calendar and an another table with all holidays here  :

Jour Férié (France)Annee Jour semaineJourDateComplèteMoisDate
Jour de l'an20180Lundilundi 1 janvier 2018Janvier1 janvier 2018
Pâques20186Dimanchedimanche 12 avril 2020Avril12 avril 2020
Lundi de Pâques20180Lundilundi 13 avril 2020Avril13 avril 2020
Fête du Travail20181Vendredivendredi 1 mai 2020Mai1 mai 2020
Armistice 194520181Vendredivendredi 8 mai 2020Mai8 mai 2020

 

I make realtion between my calendar and my holidays table, and its working. 

I begin with the Excel Working Days : and it doesnt works .

IF (OR ([@WeekDay] = 6, [@WeekDay] = 7), 0, IF (ISNA (VLOOKUP ([@Date], HolidaysTable[#Data], 2, FALSE)), 1, 0))

The first part is working : IF (OR ([@WeekDay] = 6, [@WeekDay] = 7), 0, 1) I have the good result. But how can i check in my jours fériés table if the date are present and if its the case then it's not a working days. 

 

Thank you in advance

1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@Milozebre,

 

You may use WEEKDAY Function and CONTAINS Function in DAX.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-chuncz-msft
Community Support
Community Support

@Milozebre,

 

You may use WEEKDAY Function and CONTAINS Function in DAX.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.