Forum Discussion

Roym's avatar
Roym
Helper IV
2 years ago
Solved

Adjust value for one row

I have a dashboard where the data is updated from another system every other hour. This includes a large table with data that is used in the dashboard. Now there is one value (one column) for one row...
  • bhanu_gautam's avatar
    bhanu_gautam
    2 years ago

    You can create a new column name using M-Code in advanced editor, make sure you re[;ace YourSourceHere with the actual source step of your query 

     

    let
    Source = YourSourceHere,
    #"Added Conditional Column" = Table.AddColumn(Source, "AdjustedDate", each if [ID] = 12380 then #date(2024, 3, 10) else [Date], type date),
    #"Removed Original Column" = Table.RemoveColumns(#"Added Conditional Column",{"Date"}),
    #"Renamed Columns" = Table.RenameColumns(#"Removed Original Column",{{"AdjustedDate", "Date"}})
    in
    #"Renamed Columns"