Forum Discussion

NidhiBhusari's avatar
NidhiBhusari
Helper IV
4 years ago
Solved

replacing source file having different column names.

Hi ,
I am replacing a .csv file with a SQL Table in Power BI. I have replaced it without issues. However, the column names are different between the .csv file and SQL Table. Also I should not rename my SQL columns to match the .csv file!!

I have multiple pages of visual and manually going around and replacing the columns is arduous!!

3 Replies

  • NidhiBhusari , I am assuming you are shifting from csv to excel or vice version.

     

    Add the new source as new table, rename columns to make sure it matches with old source.

    Then take this code and replace it on top to old code, match the table name in next step 

     

    #"Rename column" might be step

    in next step the check the table name used and use this one 

    • NidhiBhusari's avatar
      NidhiBhusari
      Helper IV

      Hi amitchandak ,

      I have a Power BI Table which has a .csv file as Data Source.
      It has columns: Customer ID, Date, Sales, UnitsI am now replacing this with a SQL Table with columns as : cm_id, t_date, revenue, qtyI now want to ensure my visuals don't get errors also I don't want to rename cm_id to Customer ID