cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Nishanth1996
Helper II
Helper II

Filter Data from last/recent Tuesday

Hi Everyone,

 

Can anyone help me, Is there any way in Power Query to filter the table on date column from last/recent "Tuesday"?

As per my reqirement, I have to show data from last tueday.

Thanks in advance.

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Nishanth1996 , These two will give you that, use that to filter the data

 

Date.AddDays(Date.StartOfWeek(Date.From(DateTime.FixedLocalNow()), 2),-7)

Date.StartOfWeek(Date.From(DateTime.FixedLocalNow()), 1)



!! Microsoft Fabric !!
Microsoft Power BI Learning Resources, 2023 !!
Learn Power BI - Full Course with Dec-2022, with Window, Index, Offset, 100+ Topics !!
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Nishanth1996 , These two will give you that, use that to filter the data

 

Date.AddDays(Date.StartOfWeek(Date.From(DateTime.FixedLocalNow()), 2),-7)

Date.StartOfWeek(Date.From(DateTime.FixedLocalNow()), 1)



!! Microsoft Fabric !!
Microsoft Power BI Learning Resources, 2023 !!
Learn Power BI - Full Course with Dec-2022, with Window, Index, Offset, 100+ Topics !!
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!

Helpful resources

Announcements
May 2023 update

Power BI May 2023 Update

Find out more about the May 2023 update.

Submit your Data Story

Data Stories Gallery

Share your Data Story with the Community in the Data Stories Gallery.

Top Solution Authors