Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Frequent Visitor

Getting all dates between 2 dates excluding weekends



I found this post, its works however when I wanna apply changes, it says that its not supported  and i cant transfer it to my dashboard. Any suggestions? 


Also  is there a way to use networkdays while using this PowerQuery M Method? I would like to display only working days between these dates 🙂 




Thank you!!!

Community Support
Community Support

Hi @VL345 ,

 Please refer to my pbix file to see if it helps you.

    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjIwNNM31jcyVNKBs82UYnWgMqb6pjAJU31zqLiRkb6hob6hAVgGwjEyVYqNBQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [startdate = _t, enddate = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"startdate", type date}, {"enddate", type date}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each { Number.From([#"startdate"])..Number.From([#"enddate"]) }),
    #"Expanded Custom" = Table.ExpandListColumn(#"Added Custom", "Custom"),
    #"Changed Type1" = Table.TransformColumnTypes(#"Expanded Custom",{{"Custom", type date}}),
    #"Added Custom1" = Table.AddColumn(#"Changed Type1", "Custom.1", each Date.DayOfWeek([Custom],Day.Monday)),
    #"Added Conditional Column" = Table.AddColumn(#"Added Custom1", "Custom.2", each if [Custom.1] >= 5 then "" else [Custom]),
    #"Removed Columns" = Table.RemoveColumns(#"Added Conditional Column",{"Custom", "Custom.1"})
    #"Removed Columns"


Best Regards
Community Support Team _ Polly

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.


When you say you want to get all the dates between two dates, you mean you want the sum of those days?

for that there is a function in dax networkingDays q returns the number of working days (you must indicate the holidays of your country ..)


Now if what you want is dates like dateTime. I recommend you create another CALENDAR TABLE. Only with the working days. and when you do the beetwen of the two dates you use this table as a reference therefore the DateTime that is there are working days between those two dates ...

I hope I have helped you in something...



thank you, well so far I am using PowerApps to calculate Working days between these two dates (From / To) its working, but I need also sequence of days per day. 


The reason : I am doing a lot of calculation and the idea is to view these calculations based on month and quarters and I cant think of any other solution how to incorporate it. So far its displaying my calculation only based on name, country etc...

Helpful resources

PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors