Forum Discussion

Alirezam's avatar
Alirezam
Helper V
5 years ago
Solved

Changing column name in a table

So, here is my problem at the moment: 

I have a table reading data from a csv file coming from an email daily. The column names might keep changing day today and I need to apply a multiplier to the values when the column changes (e.g. in this case, the data under MWh should be multiplied by 1000). How can I separate these tables based on two types of columns? or how can I apply this calculation only when the column is one of these two types? the number of rows every day is the same (24 rows) I want to make this in Power Query not DAX. Many thanx

 

 

  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi Alirezam ,

     

    1.Split column by custom delimiter

     

    2.Use fill down in both columns

     

    3.Add the following custom columns

     

     

    Best Regards,

    Stephen Tao

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 Replies

  • Do you have individual columns per location?  You will want to avoid that. 

     

    You can split the column with the kWh/MWh and then fill down on the second column.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Alirezam ,

     

    1.Split column by custom delimiter

     

    2.Use fill down in both columns

     

    3.Add the following custom columns

     

     

    Best Regards,

    Stephen Tao

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.