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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
quantfinRguy
Frequent Visitor

R error - "We cannot convert the input due to duplicate column names:"

I am trying to imput several data.tables through R but I keep running into this error.

 

I have no idea what is causing it, since none of my data imported into the R script has a "Total" column, nor do any of the outputs. I removed them all, but the issue still persists. 

 

Anyone have a solution?

5 REPLIES 5
v-sihou-msft
Microsoft Employee
Microsoft Employee

@quantfinRguy

 

As you said, you imported "several" data.tables, it's only supported to get one dataset each time from any query or script when retrieving data. So make sure your R script return only one result set. 

 

Regards,

@v-sihou-msft

 

I was able to import all 4 data tables in one data pull. 

 

The script worked fine when copy and pasted into the pop-up window rather than running "source(...)"

 

This seems to be a bug.

Hi @quantfinRguy

 

I am in the same situation ... Could you tell me what do you reffer with "  worked fine into the pop-up window rather than running "source(...)""?

 

Normally to load data I used Get data > Other > R script 

 

Thanks in advance!

BeardyGeorge
Advocate I
Advocate I

Could you attach a screenshot? It might provide a little more context as to what's causing the problem.

 

Cheers,

 

George.

The Error messageError message

OutputOutput

There are 4 output tables. I could easily combine them with a 5th column with an identifier value. The error occurs before the script executes. 

 

90% of the input data are used in other scripts that import on other scripts without error, so I know it isn't those. 

 

The only other table does not have a "Total" column. 

 

The script executes perfectly fine when sourced in in RStudio.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.