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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
thomasgcoelho
Frequent Visitor

Calculating Recurring Time Between Start and End Date

Hello all!

 

I'm trying to visualize the total of expected inspections per month.

 

Example data:

Employee Number of Inspections Expected Frequency (days) Date Start Date End
Adam11001/03/202231/08/2022
Brigitte21001/05/202231/10/2022

 

Clarification on the meaning of the data above: Adam needs to do 1 inspection every ten days, starting in 01/03/2022 and ending in 31/08/2022.

 

The result from the table above would be something like this below, but I'm having trouble making it happen in Power Query:

Table_Expected_per_Month

Employee  january february march april may june july august september october november december
Adam 0 0 3 3 3 3 3 3 0 0 0 0
Brigitte 0 0 0 0 6 6 6 6 6 6 0 0

 

1 ACCEPTED SOLUTION

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

7 REPLIES 7
Ashish_Mathur
Super User
Super User

Hi,

So for Adam you want the daes to increment by 10 days starting from March 1, 2022 and go upto August 31, 2022.  How should it be for Brigette - 1 every 5 days?  Please show the expected result in a simple Table format.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hello @Ashish_Mathur !

You're correct about Adam! Here is a clarification in text:

  • About Adam: He is expected to do 1 inspection every 10 days starting on March 1, 2022 and ending on August 31, 2022.
  • About Brigitte:  She is expected to do 3 inspections every 10 days starting on May 1, 2022 and ending on October 31, 2022.

 

Result expected in table format:

Employee  january february march april may june july august september october november december
Adam 0 0 3 3 3 3 3 3 0 0 0 0
Brigitte 0 0 0 0 6 6 6 6 6 6 0 0


Thank you in advance!

What happens in Feb in which there are less than 30 days?


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Here is an example of what could happen in February. In this example consider starting date as February 1st, 2022 and 1 inspection in each 10 days:

thomasgcoelho_0-1648820728394.png

 

I'm having trouble creating a table that shows this behavior.

 

Thank you for the reply.

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thank you very much Ashish Mathur!

I was able to use the logic in my real data and achieve the desired result. I'll mark your post as a solution.

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors