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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Issue with Power BI Desktop deduplication on changing datasource (direct query to Power BI Dataset)

Hi everyone, 

 

I am currently facing an issue with Power BI. I have a direct query to AS connection in Power BI (connected to a Power BI dataset in direct query). For testing purposes I have connected to an excel file.

Wienforth_1-1699369657862.png

 

 

The bug with the deduplication happens for the table PBI_Measures which comes from the source. I added two testing Measures to the table. Both measures simply say 123 or 456 in their definition.

Wienforth_0-1699369609448.png

 

When I switch the connection to different Power BI dataset (with the same structure, just different data) the table is duplicated with the suffix I provided. If I do not provide a suffix for duplicated tables it displays the table as PBI_Measures 2.

Wienforth_2-1699369948355.png

Wienforth_3-1699370042941.png

 

When I revert the connection back to the original dataset the duplicated table vanish which is what I expect. 

When I move both measures to a different table, the PBI_Measures table does not get duplicated. However, the table I moved these measures to (vDIM_Account) is not duplicated after changing the source again.

Wienforth_5-1699370365803.png

 

All tables in the datamodel behave in one of these two ways without any regularity I can find. Some tables get duplicated, others do not. The same issue occurs when working with calculated columns instead of measures.

 

It might have something to do with Power BI thinking it has duplicate tables while switching the datasource leading to some tables getting flagged as a duplicate even though I only change the source, not add another one. During my tests over the last couple of weeks I could not find any regularity in this behaviour, thats why I hope you guys can help me here 🙂

 

Best regards

Timo

Status: Needs Info
Comments
Anonymous
Not applicable

Hi  @Wienforth 

You mentioned that "When I revert the connection back to the original dataset the duplicated table vanish which is what I expect. " , can you explain it in detail ?

You created measures in table PBI_Measures and then switch the connection to different Power BI dataset , then reconnect to the original dataset,right ?

You also mentioned that "When I move both measures to a different table, the PBI_Measures table does not get duplicated." ,what is the outcome you want to achieve? As you said above, you want it to vanish. Now wouldn't MEASURE not have a duplicate value be exactly what you expect?

I'm a bit confused and look forward to your reply!

 

 

Best Regards,
Community Support Team _ Ailsa Tao

 

 

 

Wienforth
Frequent Visitor

Hi @Anonymous thank you for your quick reply! 

 

When I revert the connection back to the original dataset the duplicated table vanish which is what I expect. " , can you explain it in detail ?

 

Your assumption with reconnecting to the original dataset is correct. In my example the one called COBI_ALL_DATASET. The duplication of the table PBI_Measures is reverted when I change back to the original dataset. What I expect from Power BI is written below 🙂 I basically want Power BI to not duplicate tables if the aren`t any duplicate tables.

 

You also mentioned that "When I move both measures to a different table, the PBI_Measures table does not get duplicated." ,what is the outcome you want to achieve? As you said above, you want it to vanish. Now wouldn't MEASURE not have a duplicate value be exactly what you expect?

 

The explanation was a bit unclear from my side my bad. The general problem is that tables are seemingly randomly duplicated when I switch the dataset connection.

 

Expectation from Power BI from my end:

Power BI should replace all tables with the ones from the new connection and move all measures and calculated columns to the new table.

When I switch to a dataset that has exactly the same structure I do not want Power BI to duplicate any table as there are no duplicate tables when I just switch the connection. I expect Power BI to replace the tables. In my example I thought Power BI would change the connection and "replace" the table PBI_Measures as there is only one table called PBI_Measures.

 

What actually happens:

Power BI duplicates the table PBI_Measures, puts the column "dummy_table" in the duplicated table called PBI_Measure 2 and leaves the created Measures in the table called PBI_Measures. This behaviour changes when I move the two measures to a different table. In that case Power BI replaces the table PBI_Measures as is expected. 

The table I move the measures to (in my example vDIM_Account) then does not get duplicated when I switch the dataset connection. 

 

  • Why does Power BI duplicate the table PBI_Measures if there are Measures associated with this table?
  • Why does Power BI then not duplicate the table vDIM_Account if I move the Measures there?

 

I hope that makes the challenge a bit more understandable.

 

Thanks again!

Timo

Wienforth
Frequent Visitor

Hi @Anonymous  just wanted to bump this back to the top in case you have any more questions regarding my problem 🙂

 

Best regards

Timo