Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello
I don't know English, sorry for the mistakes.
But I need help in power query. I only want the data in the date column without the current month of the previous year - that is, without data from 1.6.-30.6.2019 - so that it is automatic.
Thank you.
Gabriela
Solved! Go to Solution.
Place this M code in a blank query to see the steps. The important one is the last one, #"Filtered Rows"
let
Source = List.Dates(#date(2019,1,1),365,#duration(1,0,0,0)),
#"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Renamed Columns" = Table.RenameColumns(#"Converted to Table",{{"Column1", "Date"}}),
#"Filtered Rows" = Table.SelectRows(#"Renamed Columns", each [Date] < Date.AddYears(Date.From(Date.StartOfMonth(DateTime.LocalNow())),-1) or [Date] > Date.AddYears(Date.From(Date.EndOfMonth(DateTime.LocalNow())),-1))
in
#"Filtered Rows"
Please mark the question solved when done and consider giving kudos if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
Hi @gabreila
Tha should be easy. You can use the filter in Power query. Make sure your column is of type date. Then go to date filters and choose
is before ---> June 1st, 2019
OR
is after --> June 30th, 2019
Please mark the question solved when done and consider giving kudos if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
Thank you, but I don't want to enter the dates manually, but to enter the current month automatically.
Place this M code in a blank query to see the steps. The important one is the last one, #"Filtered Rows"
let
Source = List.Dates(#date(2019,1,1),365,#duration(1,0,0,0)),
#"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Renamed Columns" = Table.RenameColumns(#"Converted to Table",{{"Column1", "Date"}}),
#"Filtered Rows" = Table.SelectRows(#"Renamed Columns", each [Date] < Date.AddYears(Date.From(Date.StartOfMonth(DateTime.LocalNow())),-1) or [Date] > Date.AddYears(Date.From(Date.EndOfMonth(DateTime.LocalNow())),-1))
in
#"Filtered Rows"
Please mark the question solved when done and consider giving kudos if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
Thank you very much for your help.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 9 | |
| 7 | |
| 7 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 22 | |
| 14 | |
| 11 | |
| 10 | |
| 9 |