FIlter specific dates from a table.

glaungani

New Member
Joined
May 5, 2018
Messages
8
hi, i have a dates table. (eg. below). I would like to use a query to filter only the last date for the Financial Year ending March 31, and the latest date available. (i.e the yellow shaded ones in table below).

would appreciate any help here.

thanks in advance.

1704159242341.png
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Hi try this

Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    cTypes = Table.TransformColumnTypes(Source,{{"Dates", type date}}),
    xList =  List.Generate( () => #date( 2010, 3 , 31 ), each _ <= #date( 2060, 3, 31), each Date.AddYears( _, 1 )) & {List.Max(cTypes[Dates])},      
    fltr = Table.SelectRows(cTypes, each List.Contains(xList,[Dates]))
in
    fltr
 
Upvote 1
Solution
You’re welcome! Cheers
 
Upvote 0

Forum statistics

Threads
1,215,069
Messages
6,122,954
Members
449,095
Latest member
nmaske

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