Forum Discussion
Change column name to use other column value
- Anonymous5 years ago
Hi Anonymous ,
Sorry that I misunderstood your requirement. Please copy and paste the updated codes into your Advanced Editor:
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjIwMjQwUtKBMIzhDANzINMAjmN1RpXSRGksAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [LMdate = _t, CMdate = _t, CDate = _t, SoldQtyLM = _t, SoldQtyMTD = _t, SoldQtyCD = _t]), #"Renamed Columns" = Table.RenameColumns(Source,{{"SoldQtyLM",Source[LMdate]{0}},{"SoldQtyMTD",Source[CMdate]{0}},{"SoldQtyCD",Source[CDate]{0}}}) in #"Renamed Columns"Best Regards
Hi Rena,
Thank you for your reply. I'm sorry maybe I didn't speak clearly enough. Just want to replace the Column name so that it can be displayed on the report. Thanks.
Best Regards,
twong
Hi Anonymous ,
Sorry that I misunderstood your requirement. Please copy and paste the updated codes into your Advanced Editor:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjIwMjQwUtKBMIzhDANzINMAjmN1RpXSRGksAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [LMdate = _t, CMdate = _t, CDate = _t, SoldQtyLM = _t, SoldQtyMTD = _t, SoldQtyCD = _t]),
#"Renamed Columns" = Table.RenameColumns(Source,{{"SoldQtyLM",Source[LMdate]{0}},{"SoldQtyMTD",Source[CMdate]{0}},{"SoldQtyCD",Source[CDate]{0}}})
in
#"Renamed Columns"
Best Regards
- Anonymous5 years agoNot applicable
Hi Anonymous
Thanks for the quick response.
But there is still a issue. When I release a report for a new day, the date in the column name will change, and the report cannot recognize the column. How should I solve it?
Thank you once again.
- Anonymous5 years agoNot applicable
Hi Anonymous ,
Did you applied any other step after the step "Renamed Columns"? If yes, it may cause the problem. Please try to apply the other steps first and put the step "Renamed Columns" as the last step....
Best Regards
- Anonymous5 years agoNot applicable
Hi Anonymous
The following is the report layout. When the second day is updated, due to the date conversion, the report cannot see the new day and an error occurs. Thanks.
Regards,
twong