cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
habaholic Frequent Visitor
Frequent Visitor

COPY DATA FROM PREVIOUS ROW TO POPULATE MISSING DATA BETWEEN DATES

I have a file, "Production"that shows date, machine and mold for ONLY the day production started.

I have another file, "Downtime" that shows date, machine, downtime reasons for EVERY day.

I want to link the 2 tables so I can show which mold (Production) was on which machine for any downtime reason (Downtime).

 

I have merged columns machine/date in both tables and used this column to link the tables. But in my visuals, I only see the mold data for the dates where production started.

I want to modify my "Production" file to show machine and mold for all days. So if the file shows for example:

Date                                  Machine                        Mold

02/03/2017                       JW1201                        332.030.2

06/03/2017                       JW1201                        650.545.1

 

I want to populate the days in between with the data from the previous row. For 03, 04, and 05/03/2017 the same mold was on the machine as was on it on 02/03/2017).

 

I have 45 different machines so I should end up with a file that has 16425 rows for 2017.

 

Suggestions? 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Moderator v-yuezhe-msft
Moderator

Re: COPY DATA FROM PREVIOUS ROW TO POPULATE MISSING DATA BETWEEN DATES

@habaholic,

1. Create a date table in Power BI Desktop.
2. Add two columns in Production table to calculate min date and max date for each machine.
3. Merge date table and Production table, use Fill down feature to fill some columns and create some required custom columns. For more details, please review the following PBIX file.

https://1drv.ms/u/s!AhsotbnGu1NogxXBcoHIW_vHlehh


Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Highlighted
Moderator v-yuezhe-msft
Moderator

Re: COPY DATA FROM PREVIOUS ROW TO POPULATE MISSING DATA BETWEEN DATES

@habaholic,

1. Create a date table in Power BI Desktop.
2. Add two columns in Production table to calculate min date and max date for each machine.
3. Merge date table and Production table, use Fill down feature to fill some columns and create some required custom columns. For more details, please review the following PBIX file.

https://1drv.ms/u/s!AhsotbnGu1NogxXBcoHIW_vHlehh


Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors