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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
BiBra
Helper III
Helper III

change datasource containing more or less columns

Hello

 

I have a report. This report is supposed to be a "super" report. This meaning it contains a set of graphs applicable to different data sources. The names included are the same, so no problem there. However, the other datasets may contain extra or fewer columns. 

I tried in query editor, where I change the source of each table. But this is where I get a fault. Is there any way to do this flaw free?

 

5 REPLIES 5
matovua
Frequent Visitor

go to edit queries, select table, advanced editor, change columns=nn, modify the column definition

 

, Columns=6, Encoding=1252, QuoteStyle=QuoteStyle.None] to , Columns=7, Encoding=1252, QuoteStyle=QuoteStyle.None]

 

Add for example {"momo_rgs_90", type text}

 

Anthony

 

 

 

Anonymous
Not applicable

Go into the advanced editor. You should see a line at the start that specifies the source of your data. In this line should be an argument specifying how many columns your data source has. Simply update this number to reflect the number of columns in your new dataset.

Yulia_S
Regular Visitor

Hi All

And does anyone know how to fis the issue when data source containes less columns?

 

v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @BiBra,

 

Based on my test, to switch to a data source containing more columns than current one, you can directly change the connection string in Power Query code as highlighted in below screenshot.

1.PNG

 

However, it is not supported to directly change to a data source with less columns. You might get below error.

3.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-yulgu-msft Thank you for your answer, however, your solution of dataset change is the same as the solution as I posted myself. 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Solution Authors