Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi Everyone,
I am new to this portal,
I need help in finding dates. I have ticket received dates, I want to add 10 days to it, but if there is weekends or holidays within this 10 days then need to extend the due date by that many days
Ticket reveived: 4thJuly 2022
business days: 10 days
Due date: 13 July 2022 but if there is a weekend on 9th and 10th July.
Result i want : 15th July 2022 instead of 13th July 2022
I tried Workday function in Excel. I dont know the logic to apply in DAX.
Solved! Go to Solution.
Hi @Anonymous
Here is the sample file with the solution for both a calculated column and a measure https://we.tl/t-jwOgrzLuxM
For calculated column please use
Due Date =
VAR CurrentDate = Tickets[Ticket St date]
VAR T1 =
CALENDAR ( CurrentDate, CurrentDate + 15 )
VAR T2 =
FILTER ( T1, NOT ( WEEKDAY ( [Date] ) IN { 6, 7 } ) && NOT ( [Date] IN VALUES ( 'Australia holidays'[Date] ) ) )
VAR T3 =
TOPN ( 10, T2, [Date], ASC )
RETURN
MAXX ( T3, [Date] )
Due Date Measure =
VAR CurrentDate = SELECTEDVALUE ( Calendar_Table[Date] )
RETURN
IF (
NOT ISBLANK ( CurrentDate ),
VAR T1 =
CALENDAR ( CurrentDate, CurrentDate + 15 )
VAR T2 =
FILTER ( T1, NOT ( WEEKDAY ( [Date] ) IN { 6, 7 } ) && NOT ( [Date] IN VALUES ( 'Australia holidays'[Date] ) ) )
VAR T3 =
TOPN ( 10, T2, [Date], ASC )
RETURN
MAXX ( T3, [Date] )
)
Hi @Anonymous
Here is the sample file with the solution for both a calculated column and a measure https://we.tl/t-jwOgrzLuxM
For calculated column please use
Due Date =
VAR CurrentDate = Tickets[Ticket St date]
VAR T1 =
CALENDAR ( CurrentDate, CurrentDate + 15 )
VAR T2 =
FILTER ( T1, NOT ( WEEKDAY ( [Date] ) IN { 6, 7 } ) && NOT ( [Date] IN VALUES ( 'Australia holidays'[Date] ) ) )
VAR T3 =
TOPN ( 10, T2, [Date], ASC )
RETURN
MAXX ( T3, [Date] )
Due Date Measure =
VAR CurrentDate = SELECTEDVALUE ( Calendar_Table[Date] )
RETURN
IF (
NOT ISBLANK ( CurrentDate ),
VAR T1 =
CALENDAR ( CurrentDate, CurrentDate + 15 )
VAR T2 =
FILTER ( T1, NOT ( WEEKDAY ( [Date] ) IN { 6, 7 } ) && NOT ( [Date] IN VALUES ( 'Australia holidays'[Date] ) ) )
VAR T3 =
TOPN ( 10, T2, [Date], ASC )
RETURN
MAXX ( T3, [Date] )
)
Hi @Anonymous
a simple way to doing that (calculated column) which can be converted to a measure by replacing the first variable with MAX, MIN or SELECTEDVALUE based on your requirement
Due Date =
VAR CurrentDate = TableName[Ticket reveived]
VAR T1 =
CALENDAR ( CurrentDate, CurrentDate + 15 )
VAR T2 =
FILTER ( T1, NOT ( CALCULATE ( WEEKDAY ( [Date] ) ) IN { 6, 7 } ) )
VAR T3 =
TOPN ( 10, T2, [Date], ASC )
RETURN
MAXX ( T3, [Date] )
@Anonymous , because there is no set pattern for bank holidays in the UK (and I assume in most countries), the only way to be sure is to have a Date table or a Calendar table, with a column that specifies whether each particular date is a working day or not. You will need to configure and maintain that table.
Once you have the Date or Calendar table in place, you can create a calculated column or measure that uses the IsWorkingDay column to work out what you want.
Hi,
I am not sure how your data model looks like, but please check the below picture and the attached pbix file.
It is for creating a new column without having a physical dim-calendar table. If you have one, please use your dim-calendar table.
10 working days later CC =
VAR _calendartable =
FILTER (
ADDCOLUMNS (
CALENDAR ( DATE ( 2022, 1, 1 ), DATE ( 2022, 12, 31 ) ),
"@weekdayname", FORMAT ( [Date], "DDDD" )
),
[@weekdayname] <> "Saturday"
&& [@weekdayname] <> "Sunday"
)
VAR _addticketreceiveddate =
CROSSJOIN ( _calendartable, Data )
VAR _adddayscount =
FILTER (
ADDCOLUMNS (
_addticketreceiveddate,
"@dayscount",
COUNTROWS (
FILTER (
_calendartable,
[Date] >= Data[TicketReceived]
&& [Date] <= EARLIER ( [Date] )
)
)
),
[@dayscount] = 10
)
RETURN
MAXX (
FILTER (
_adddayscount,
Data[TicketReceived] = EARLIER ( Data[TicketReceived] )
),
[Date]
)
Hello Jihwan,
I was trying in my data but still getting an incorrect result.
I am attaching my file for your reference. This is my Date table
This is my Ticket table
Hi,
Thank you for your feedback.
Please share your sample pbix file's link here, and then I can try to come up with more accurate solution for your data model.
Thanks.
Hi
I tried to upload my pbix file but i am not getting option to load the file. May be i am not allowed
Hi,
I am sharing the drop box link, wherein I have upload my .pbix file. In this file i also have my holidays list. So Now I want to exclude weekends and holidays also to calculate my due date.
https://www.dropbox.com/sh/9czd3q9slt7ddlc/AADqIzIdCUHd4UkQbh6o3viJa?dl=0
Hi,
thank you for your sample file.
please check the attached file down below.
I fixed the formula in the ticket table.
Thank you.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
7 | |
5 | |
4 | |
3 |
User | Count |
---|---|
12 | |
11 | |
10 | |
9 | |
8 |