Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Jagat
New Member

MTD Working Days

hi there,

need help to create the "MTD Working Days" which also work on the "Month" slicer.

I have "Holiday Master" with date & status columns. Status column contains "Holiday" or "Working".

For example: last month(June), I had 24 working days & in current month(July), I have 23 working days.

so if my month slicer is on June then "MTD Working Days" return 24 as on today all June working days are passed but if month slicer is on July then it must return the number of working days till yesterday.

 

Kindly help me on that.

1 ACCEPTED SOLUTION

Aha, thx for the tip! I'm still dwelling on the old-school formulas.

MTD Networkday.pbix

 

ThxAlot_1-1689437890860.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LeanAndPractise(Everyday)


)



View solution in original post

4 REPLIES 4
ThxAlot
Super User
Super User

Easy enough and I always use a separate HOLIDAY table for better readability and maintenance.

MTD Networkday.pbix

 

ThxAlot_0-1689437577964.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LeanAndPractise(Everyday)


)



There's also this syntax sugar option:  NETWORKDAYS function (DAX) - DAX | Microsoft Learn

Aha, thx for the tip! I'm still dwelling on the old-school formulas.

MTD Networkday.pbix

 

ThxAlot_1-1689437890860.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LeanAndPractise(Everyday)


)



lbendlin
Super User
Super User

Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.

https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.