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.
I have an interesting ask, I have a code that I use to find dates between 2 given dates;
= Table.AddColumn(#"Renamed Columns", "Work Days", each { Number.From([First Date])..Number.From([Last Date]) })
What I want to do, is extract the dates between the 2 columns (First Date, Last Date) and exclude those given dates. For example if the Start Date is 1/1/2020 and the Last Date is 1/10/2020. I only want to return the dates 1/2/2020-1/9/2020 in my data. Is this possible? Currently it expands all rows which is fine but it includes the start and last date; however these dates are never the same and can change based on project length which is why I can't use any workday formulas. The exlusion doesn't have to be within the same formula, I can always add another step after if that's easier. I'm just stumped on how to make it work.
Solved! Go to Solution.
Hello,
use Date.AddDays ;
Table.AddColumn(#"Renamed Columns", "Work Days", each { Number.From(Date.AddDays([First Date],1))..Number.From(Date.AddDays([Last Date],-1)) })
Best regards
Hello,
use Date.AddDays ;
Table.AddColumn(#"Renamed Columns", "Work Days", each { Number.From(Date.AddDays([First Date],1))..Number.From(Date.AddDays([Last Date],-1)) })
Best regards
@TMO_KY , refer if this file can help a bit https://www.dropbox.com/s/bqbei7b8qbq5xez/leavebetweendates.pbix?dl=0
*Update*
So I ended up creating an additional custom column that uses a filter with a true false statement then filtered out the "true's". This works but if anyone has a better workaround with less "steps" I'd appreciate it.
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 |
---|---|
12 | |
11 | |
9 | |
9 | |
8 |