March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hello Community,
I have created networkdays between two days (it includes holidays and excludes weekends) by using this:
Solved! Go to Solution.
Hi @Anonymous ,
we can create such a measure to meet your requirement.
NetWorkDaysENDExcludeHoliday = VAR Calendar1 = CALENDAR ( MIN ( 'Query1'[END] ), MAX ( 'Query1'[FYEND] ) ) VAR Calendar2 = ADDCOLUMNS ( Calendar1, "WeekDay", WEEKDAY ( [Date], 2 ) ) RETURN SUMX ( FILTER ( Calendar2, [WeekDay] <= 5 ), IF ( CONTAINS ( holidays, 'holidays'[Date], [date] ), 0, 1 ) )
BTW, pbix as attached.
Best regards,
Community Support Team _ DongLi
If this post helps, then please consider Accept it as the solution to help the other members find it more
Hi @Anonymous ,
we can create such a measure to meet your requirement.
NetWorkDaysENDExcludeHoliday = VAR Calendar1 = CALENDAR ( MIN ( 'Query1'[END] ), MAX ( 'Query1'[FYEND] ) ) VAR Calendar2 = ADDCOLUMNS ( Calendar1, "WeekDay", WEEKDAY ( [Date], 2 ) ) RETURN SUMX ( FILTER ( Calendar2, [WeekDay] <= 5 ), IF ( CONTAINS ( holidays, 'holidays'[Date], [date] ), 0, 1 ) )
BTW, pbix as attached.
Best regards,
Community Support Team _ DongLi
If this post helps, then please consider Accept it as the solution to help the other members find it more
Hello guys,
Any Suggestions Please...
Thank you in advance
Regards,
B V S S
Hello @Anonymous
I have attached a sample file where my Dates table has a column "IsWorkingDay" that is = FALSE on weekends and holidays. Using that and the dates you are comparing you can just do a count of rows with some filtering.
WorkingDays = VAR LowEnd = FIRSTDATE ( 'Table'[StartDate] ) VAR HighEnd = LASTDATE ( 'Table'[EndDate] ) RETURN CALCULATE ( COUNTROWS ( Dates ), Dates[Date] >= LowEnd && Dates[Date] <= HighEnd, Dates[IsWorkingDay] = TRUE )
Hi @jdbuchanan71 ,
Thank you for your response.. I tried but it's not working properly for my case. May be some other cases it will work
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
133 | |
91 | |
88 | |
64 | |
58 |
User | Count |
---|---|
201 | |
137 | |
107 | |
73 | |
68 |