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
grggmrtn
Post Patron
Post Patron

Fill down dates (weekend) - when there's no row to fill?

Our data looks something like this:

PersonID	Date		Pause

1		03-01-2019	0
1		04-01-2019	1
1		07-01-2019	1
1		08-01-2019	1
2		17-01-2016	1
2		18-01-2016	0
2		21-01-2016	0
2		22-01-2016	0
2		23-01-2016	0

So basically, is a person "paused" on which days.

But as you can see here, my table doesn't include dates for weekends (or holidays, I've just noticed). Unfortunately, I need to have the weekends because of some other stuff that's happening in my report.

The pause boolean continues during the weekend with the value for Friday.

 

If there was a blank row where the weekend SHOULD be, I'd just do a fill down on the pause, and be happy. But there's no blank row.

 

To summerise, I need the dates for each person to be consecutive, and to include the missing weekend dates with Friday's value for Saturday and Sunday.

 

Any ideas?

1 ACCEPTED SOLUTION
HotChilli
Super User
Super User

Could you :

create a Date table in Power Query (create a blank query-> use List.Dates)

This would get you a Date table with one column.

Merge the Date table with your existing table (left join so you keep all the rows in the date table)

Then you can use the 'Fill Down' idea that you proposed.

View solution in original post

4 REPLIES 4
HotChilli
Super User
Super User

Could you :

create a Date table in Power Query (create a blank query-> use List.Dates)

This would get you a Date table with one column.

Merge the Date table with your existing table (left join so you keep all the rows in the date table)

Then you can use the 'Fill Down' idea that you proposed.

Of course! Thanks @HotChilli 

Did you get this sorted? I think you have deleted a message that you posted in the thread?

Hey @HotChilli thanks for responding.

 

Yeah I posted a follow up because the missing weekends were giving me problems, which I deleted after speaking with the customer.

 

I discovered that the weekend dates were THERE, but a column that I wasn't showing here (because I didn't think it was needed for the example) was only set up to show weekdays - meaning that there was no data for the weekends anyway. And PowerBI was automatically filtering the weekend dates away in the query.

 

I'm not sure that I found much of an answer to getting the weekends back, other than that fact that the customer decided that they didn't need data for the weekends anyway.

 

So instead of focusing on specific dates, I created visuals for the customer that slice data by week number, and the customer seems happy (for now 🙂 )

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.