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

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
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,224,813
Messages
6,181,109
Members
453,021
Latest member
Justyna P

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