cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ClaytonMUK Frequent Visitor
Frequent Visitor

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

Accepted Solutions
Highlighted
ClaytonMUK Frequent Visitor
Frequent Visitor

Re: CSV Data Source Change

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
Super User IV
Super User IV

Re: CSV Data Source Change

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


I have book! Learn Power BI from Packt


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

Highlighted
ClaytonMUK Frequent Visitor
Frequent Visitor

Re: CSV Data Source Change

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

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

January 2020 Community Highlights

January 2020 Community Highlights

Make sure you didn't miss any of the things that happened in the community in January!

Top Solution Authors