This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Step 1: Create a CalendarGenerator() function and paste the contents below into the Advanced Editor | |
| let CreateDateTable = (StartDate as date, EndDate as date, optional Culture as nullable text) as table => | |
| let | |
| DayCount = Duration.Days(Duration.From(EndDate - StartDate)), | |
| Source = List.Dates(StartDate,DayCount,#duration(1,0,0,0)), | |
| TableFromList = Table.FromList(Source, Splitter.SplitByNothing()), | |
| ChangedType = Table.TransformColumnTypes(TableFromList,{{"Column1", type date}}), | |
| RenamedColumns = Table.RenameColumns(ChangedType,{{"Column1", "Date"}}), | |
| InsertYear = Table.AddColumn(RenamedColumns, "Year", each Date.Year([Date])), | |
| InsertQuarter = Table.AddColumn(InsertYear, "Quarter Number", each Date.QuarterOfYear([Date])), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Get-ChildItem -Path 'C:\Your\Directory\Here\' -Filter '*old*' | Rename-Item -NewName { $_.name -replace 'old','new' } |
OlderNewer