Having values persist in column names?

主宰稳场 提交于 2020-01-16 08:50:13

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!