Reputation: 147
I have generated a list of dates in Power Query. I want it to only show dates that are Sunday. Is there a way to do this? I want the outcome to actually show a date.
Example: 3/15/20, 3/22/2020, 3/29/2020
Upvotes: 1
Views: 685
Reputation: 21393
Add a custom column that references date column using Date.DayOfWeekName() function, then filter on that column, and remove it
#"Added Custom" = Table.AddColumn(#"PreviousStep", "Custom", each Date.DayOfWeekName([date])),
#"Filtered Rows" = Table.SelectRows(#"Added Custom", each ([Custom] = "Sunday")),
#"Removed Columns" = Table.RemoveColumns(#"Filtered Rows",{"Custom"})
Upvotes: 2