How to get the data based only from the date that the user input in power query?

ellala2117

New Member
Joined
Sep 19, 2022
Messages
1
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
  3. Web
How to get the data based only from the date that the user input in power query?
e.g.

DATE RECEIVED
9/9/2022
9/10/2022
9/11/2022
9/14/2022
9/15/2022

Date that the user input
Start Date : 9/10/2022
End Date: 9/15/2022
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Use name manager (Ctrl+F3 or Formulas card on a ribbon) and define names refering to the cells where user writes stardate and enddate. Let's assume you gave them Startdate and Enddate names.
Then you can use these values in your m code (in advanced editor in Power Query) in a way similar to:

Power Query:
///...
    my_startdate_from_named_range = Excel.CurrentWorkbook(){[Name="Startdate"]}[Content]{0}[Column1],
    my_enddate_from_named_range = Excel.CurrentWorkbook(){[Name="Enddate"]}[Content]{0}[Column1],

    #"Filtered Rows" = Table.SelectRows(#"Previous Step", each [myDateColumn] >= my_startdate_from_named_range and [myDateColumn] <= my_enddate_from_named_range),
///...
 
Upvote 0

Forum statistics

Threads
1,215,453
Messages
6,124,930
Members
449,195
Latest member
Stevenciu

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