问题
Thanks to another Stack Overflow user I'm able to capture today's date and insert it into my column headers. However each time I refresh the data it refreshes the date. Is there a way using Power Query to make the date stick after it is applied? I don't want it refreshed after the initial calculation. So if it gets set to 5/6/2019 on 5/6, when I refresh the data on 5/8 it's changing to 5/8/2019. I would like it to stay at 5/6/2019.
Here is the code that was provided to insert the dates:
Let
...
NewName = "Size_"&Date.ToText(DateTime.Date(DateTime.LocalNow())),
#"Changed Type" = Table.TransformColumnTypes(Sheet1_Table,{{"Size", Int64.Type}}),
#"Renamed Columns" = Table.RenameColumns(#"Changed Type",{{"Size", NewName}})
in
#"Renamed Columns"
来源:https://stackoverflow.com/questions/56084559/having-values-persist-in-column-names