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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Problem changing one data source for another identical one

Hello everyone!

 

I created a data model from one data source. That data source will be updated every week, by adding more data at the bottom. Some of the data we add every week will be repeated, as the data is made up of pipeline snapshots. However, evey week we produce a new Gsheet for this data, and it is saved in a different folder.

 

I am following these directions that I found to replace one data source for another. I have built the data model on an old snapshot file. What I would like to do is to replace the data source file every week for the one that has the latest data. The structure of the files is exactly the same. The only difference is the new weekly snapshot that is added at the bottom.

 

If you click on the directions, there are three ways to do this. I couldn't use the first two, as the option to change the source is not highlighted. I think it's because this may not be possible with Gsheets.

 

The M code option is possible, though. I am able to replace the source data form one table to another. Everything looks good, until I close the transformation window and go to the actual file. All the data starts to reload, adn I get the following error message:

 

 

rrff_0-1683739437307.png

 

I don't understand the error message. I am not sure if the added rows are creating some kind of conflict. I know for a fact that all the columns are in the same place.

 

I am hoping that someone can help me to interpret the message, or can help me to find a way to change the source that will work. Otherwise, I will have to build the data model every week, which is not ideal.

 

Thank you!

 

3 REPLIES 3
Anonymous
Not applicable

I tried to eliminate the error by making an exact copy of the original Gsheet, changing the source to that one, and then adding the latest week's data.

 

The data source change works. After I add the new data and refresh, it's available on the table. However, I build two extra tables with that data. In one of them, I bring the data from the previous week's snapshot, filtering by snapshot date. On the other, I filter for currnet week's snapshot. When I go to these sub-tables, I don't see the latest week's data, which means that I can't update the model.

 

All measures are built in a third sub-table, which is a join of the previous week and current week's sub-tables.

 

I don't understand why the OG source table's data is not being picked up by the sub-tables. Could someone please explain?

 

Thank you!

mussaenda
Super User
Super User

Hi @Anonymous ,

 

the error message is informing you that you have a duplicate value on column ID2 in Raw Data table.

This happens when  the relationship created before was many to one.

 

You have options:

Try to remove the relationship, refresh the data, then create the relationship again.

or

check your raw data column ID2 why there is duplicate. Remove the duplicate, then refresh the data.

 

Let me know if this solves your issue.

 

Anonymous
Not applicable

Hi! Thank you for explaining the error message.

 

I suppose the duplicate would be in the new data source, since I was not having this problem with the old one. I will have to go through it, since there really should be no duplicates. ID2 is a concatenation of opp ID and date of snapshot.

 

I would rpefer to just switch the source without removing the relationships. I am creating two new tables from the original, and building a third one from those two. I think it would break everything. Is there a way to remove the relationship, if I have three tables that are created fromt he original?

 

I will take a look and circle back. Thank you!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors