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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Cookistador
Helper II
Helper II

Show days in month between two dates

Hi Everyone,

 

I have a table with a start date and end data for Employees/Trainees, and I would like to get the days that ressources are working for a company by month

So imagine, I have this kind of table:

 

   Name    Entry Date     Leave Date
Bob   01/01/2022   15/03/2022
Max   01/02/2022    30/04/2022

 

And I would like to get something like that:

   Name   Entry Date   Leave Date   JanuaryFebruaryMarchApril 
   Bob   01/01/2022   15/03/2022   31   28150
   Max   01/02/2022   30/04/2022   0283115

 

Any clues how can I achieve that?

 

Many thanks in adavance for your help

1 ACCEPTED SOLUTION
Manoj_Nair
Solution Supplier
Solution Supplier

@Cookistador - pls try this PBIX FILE, 

We worked on the power query part and taken into account only April Month to keep it simple and to give you an idea on one way to approach your requirement. You can replicate the same logic for other months.

Let me know how you are going about it. 

If this answered your question I would be happy if you could mark my post as a solution and give it a thumbs up

 

Best regards

Manoj Nair

Linkedin - https://www.linkedin.com/in/manoj-nair-%E2%98%81-344666104/

View solution in original post

1 REPLY 1
Manoj_Nair
Solution Supplier
Solution Supplier

@Cookistador - pls try this PBIX FILE, 

We worked on the power query part and taken into account only April Month to keep it simple and to give you an idea on one way to approach your requirement. You can replicate the same logic for other months.

Let me know how you are going about it. 

If this answered your question I would be happy if you could mark my post as a solution and give it a thumbs up

 

Best regards

Manoj Nair

Linkedin - https://www.linkedin.com/in/manoj-nair-%E2%98%81-344666104/

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.