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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.