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
Anonymous
Not applicable

Does anyone know what is this code doing and where to enter the code?

#"Filtered Rows" = Table.SelectRows(#"Expanded Changed Type", each [Update Date] > Date.From(Date.AddDays(DateTime.LocalNow(), -30)))

 

Javierphang_0-1646813667912.png

(Image 1) 

 

Javierphang_2-1646813854088.png

(Image 2)

My understanding is that: using the update column values more than the local time which is today - 30 days? 

Furthermore, does anyone know input this code aside from advanced editor as shown in image 2. Thanks!

 

 

1 ACCEPTED SOLUTION
vojtechsima
Memorable Member
Memorable Member

Hi, @Anonymous 
Yeah, the code filter dates that are in the last 30 days.
The same you can do with these steps:

vojtechsima_0-1646814448699.pngvojtechsima_1-1646814459827.png

 

= Table.SelectRows(#"Extracted Text Before Delimiter", each Date.IsInPreviousNDays([Created], 30))

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Alright, thank you very much. I will test it out on my side. 

vojtechsima
Memorable Member
Memorable Member

Hi, @Anonymous 
Yeah, the code filter dates that are in the last 30 days.
The same you can do with these steps:

vojtechsima_0-1646814448699.pngvojtechsima_1-1646814459827.png

 

= Table.SelectRows(#"Extracted Text Before Delimiter", each Date.IsInPreviousNDays([Created], 30))

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.