Power Query

gheyman

Well-known Member
Joined
Nov 14, 2005
Messages
2,347
Office Version
  1. 365
Platform
  1. Windows
I know how to create a list from a table, where the user enters info, and use that to "Filter" data.

Example: #"Filtered Rows" = Table.SelectRows(ModelPropricer_vdataProposalMaterial, each List.Contains(SelectedProposal,[ParentId]) or List.NonNullCount(SelectedProposal)=0)

How can I do something similar with a date? I want to filter to a date but I want it where it filters to equals or is greater than the date.

The name of the list is Start_Date [Start Date]
The name of the table I am filtering is Search_Results and the field I want to filter is StartDate

Thanks for the help and lesson!
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Search_Results"]}[Content],
    tbl = Table.TransformColumnTypes(Source,{{"StartDate", type date}}),
    DateFilter = Date.From(Excel.CurrentWorkbook(){[Name="FilterDate"]}[Content][Filter Date]{0}),
    Result = Table.SelectRows(tbl, each [StartDate] >= DateFilter)
in
    Result


Book3
ABCDEFGH
1StartDateItemStartDateItemFilter Date
23/31/2022A6/9/2022B4/30/2022
36/9/2022B6/1/2022C
46/1/2022C6/8/2022H
53/24/2022D5/21/2022I
63/27/2022E5/2/2022J
74/16/2022F6/13/2022K
83/17/2022G6/8/2022L
96/8/2022H
105/21/2022I
115/2/2022J
126/13/2022K
136/8/2022L
14
Sheet1
 
Upvote 0

Forum statistics

Threads
1,223,671
Messages
6,173,735
Members
452,531
Latest member
Dufus1024

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top