Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
CzarL
New Member

Date Filter - Earliest date + 4 days

I am trying to filter a column with dates that are different everyday.

I want to have Earliest date + 4 days, is this possible?

1 ACCEPTED SOLUTION
v-yanjiang-msft
Community Support
Community Support

Hi @CzarL ,

According to your description, here's my solution.

Add a step like this:

 

#"Filtered Rows" = Table.SelectRows(#"Changed Type", each ([Date] = Date.AddDays(List.Min(#"Changed Type"[Date]),4)))

 

Here's the whole M syntax:

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjIwMtK31DdUitWBc4yQOcbIHBNkjikyxwyZY47MsVCKjQUA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Date = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Date", type date}}),
    #"Filtered Rows" = Table.SelectRows(#"Changed Type", each ([Date] = Date.AddDays(List.Min(#"Changed Type"[Date]),4)))
in
    #"Filtered Rows"

 

Get the correct result.

vkalyjmsft_0-1663900432854.png

To:

vkalyjmsft_1-1663900452063.png

I attach my sample below for your reference.

 

Best Regards,
Community Support Team _ kalyj

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

3 REPLIES 3
v-yanjiang-msft
Community Support
Community Support

Hi @CzarL ,

According to your description, here's my solution.

Add a step like this:

 

#"Filtered Rows" = Table.SelectRows(#"Changed Type", each ([Date] = Date.AddDays(List.Min(#"Changed Type"[Date]),4)))

 

Here's the whole M syntax:

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjIwMtK31DdUitWBc4yQOcbIHBNkjikyxwyZY47MsVCKjQUA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Date = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Date", type date}}),
    #"Filtered Rows" = Table.SelectRows(#"Changed Type", each ([Date] = Date.AddDays(List.Min(#"Changed Type"[Date]),4)))
in
    #"Filtered Rows"

 

Get the correct result.

vkalyjmsft_0-1663900432854.png

To:

vkalyjmsft_1-1663900452063.png

I attach my sample below for your reference.

 

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

This worked perfectly!

 

Thanks!

 

CzarL
New Member

@wdx223_Daniel  help bro!

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors