Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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.