cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Alirezam
Helper V
Helper V

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

 

Alirezam_0-1628044233889.png

 

1 ACCEPTED SOLUTION
v-stephen-msft
Community Support
Community Support

Hi @Alirezam ,

 

1.Split column by custom delimiter

1.png2.png

3.png

 

2.Use fill down in both columns

4.png5.png

 

3.Add the following custom columns

6.png7.png

8.png

 

 

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.

View solution in original post

2 REPLIES 2
v-stephen-msft
Community Support
Community Support

Hi @Alirezam ,

 

1.Split column by custom delimiter

1.png2.png

3.png

 

2.Use fill down in both columns

4.png5.png

 

3.Add the following custom columns

6.png7.png

8.png

 

 

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.

lbendlin
Super User
Super User

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.

Helpful resources

Announcements
August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power BI Dev Camp Session 24 without aka link and time 768x460.jpg

Ted's Dev Camp - July 28, 2022

Watch Session 24 of Ted's Dev Camp along with past sessions!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.