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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
sande_ch
Helper I
Helper I

Power BI: PostgreSQL Error 42703 (“column does not exist”) when switching to identical table

Hi everyone,

I’m facing an issue in Power BI that I can’t explain.

I have built a fairly complex report with:

  • a complex data model
  • multiple tables imported from PostgreSQL
  • many measures

Now I want to replace one table in the background with another table from the same PostgreSQL database.

  • Both tables have identical structure (same columns, same names, same number of columns)
  • No transformations were applied in Power Query (only Source and Navigation step

When I change the navigation step in Power Query to point to the new table, I get following error:
DataSource.Error: PostgreSQL: 42703: column $Table.stelnahm does not exist
Details:
DataSourceKind=PostgreSQL
Message=42703: column $Table.stelnahm does not exist
Which is confusing, because

  • Neither the old nor the new table contains a column called stelnahm
  • No relationships reference this column
  • None of my measures use this column
  • Power Query shows no additional transformation steps

 

Could Power BI still reference a deleted column or measure in the background? Could this be caused by cached metadata or model dependencies?
Is there any way to inspect or edit the generated SQL query? 

Re-importing the table works, but I would have to rebuild all relationships and measures, which is very time-consuming.


Any ideas or hints would be greatly appreciated!

Thanks in advance
Sandra

 

 

 

 

6 REPLIES 6
sande_ch
Helper I
Helper I

Hi there

Thank you all very much for the valuable feedback: @vojtechsima@Natarajan_M @v-hjannapu 

 

I tried everything. In the end, it turned out that I had to click “Refresh Preview” in Power Query for it to work. I had only clicked “Refresh” when the message “This preview may be up to xx days old” appeared. However, that message didn’t appear for the problematic table, since the error message popped up right away.

 

So the problem is solved.

 

Thank you very much for your help!

 

Hi @sande_ch,

Glad to hear it’s working now .Thanks for confirming the update.

If you face any other issues or need help in future, feel free to post here. We will be happy to help.

Regards,
Community Support Team.

v-hjannapu
Community Support
Community Support

Hi @sande_ch,

I would also take a moment to thank @vojtechsima , for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.
 

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.

Regards,
Community Support Team.

vojtechsima
Super User
Super User

Hey, @sande_ch ,
I would first do couple of things:

1) If you can, download Tabular Editor 2, it's free, and inspect your original data model for anything named as that phantom column; if you did resaved this from another report, it could be hidden somewhere

2) Clear cache from the settings

3) I would recommend going to the new report, where your simple M code works, and I would check the native Query, if you don't wanna write SQL yourself, and copy it and apply it do the new query, so you won't use the navigation and folding, but you will use custom query (that's usually the best approach regardless).

 

To get Native Query, click the working last step of the database query and you should see not greyed out option:

vojtechsima_0-1775235721830.png

 






Any kudos or recognition appreciated. To learn more on the topic, check out my blog and follow me on LinkedIn.
sande_ch
Helper I
Helper I

Hi there

The M-Code in Power Query is:
let Quelle = PostgreSQL.Database("Server", "Database"), powerbi_taritemp_unfallliste_buv = Quelle{[Schema="powerbi",Item="taritemp_unfallliste_buv"]}[Data] in powerbi_taritemp_unfallliste_buv

 

Natarajan_M
Solution Sage
Solution Sage

Hi @sande_ch  , Can you share the Power Query so we can help you better?

Thanks 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.