Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
ClaytonMUK
Helper I
Helper I

CSV Data Source Change

Hi,

I've created quite a few visulisations based on a CSV with 17 cols. There was 1 col I didn't need so I just removed it in Query Editor. I also created a few new cols based on merged values from other cols, renamed, change type etc. Now I find my source csv is provided without the superfluous col but when I load that new data file I get an error that the col does not exist.

So, I tried editing via Advanced Editor and removed reference to the unwanted col and changed the number of Columns to 16 but i still get an error "Expression.Error: The import Removed Columns matches no exports. Did you miss a module reference?"

I've tried looking for similar issues and see people have suggested copying the new table in, then changing the name and deleting the original one, but if I do that then I lose the merged cols and all the measures I created.

I'm getting to the stage of starting again with the new csv, but surely there must be a way to re-load a csv with less columns (especially where they are now used!)??

thanks,

1 ACCEPTED SOLUTION

I fixed it 🙂

I realised the next line in Query Editor > Advanced Editor needs to reference the previous line. i.e. (if it helps anyone else..)

I had removed my unwanted line like : #"Removed Columns" = Table.RemoveColumns(#"Changed Type",{"....

The next line still reference it.

#"Inserted Merged Column" = Table.AddColumn(#"Removed Columns", "Merged", ......

 

I changed it so the value matched that from the previous line: (hope that makes sense)

#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{.....
#"Inserted Merged Column" = Table.AddColumn(#"Changed Type", "Merged",.....

 

I guess this can be closed 🙂

View solution in original post

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

Can you post the text from Advanced Editor? Can recreate this from that.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

I fixed it 🙂

I realised the next line in Query Editor > Advanced Editor needs to reference the previous line. i.e. (if it helps anyone else..)

I had removed my unwanted line like : #"Removed Columns" = Table.RemoveColumns(#"Changed Type",{"....

The next line still reference it.

#"Inserted Merged Column" = Table.AddColumn(#"Removed Columns", "Merged", ......

 

I changed it so the value matched that from the previous line: (hope that makes sense)

#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{.....
#"Inserted Merged Column" = Table.AddColumn(#"Changed Type", "Merged",.....

 

I guess this can be closed 🙂

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors