cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Phogon
Helper II
Helper II

Relationship + Metadata + Query + Update

I have the following datamodel (inactive relationships are intentional)

image.png

 

 

 

 

 

 

 

 

 

 

I am trying to make it so the file is a template, and the Data table can be ammended in the Query however I like with all sorts of random data. However, when I update the source perform cleaning, the relationship for Dim_001,002,003 gets deleted, whilst the relationships for calendar and attribute continue to exist.

 

I have done some testing, and believe it to be due to the metadata somewhat. If the raw data column has the exact same is the old and new file when I promote headers, then the relationship will maintain. In this situation, the calendar relationship with Data[Date_001] and Calendar[Date] remained as the raw data were both named "orderdate" initially. 

 

The attribute relationship naturally dont not refresh as it comes from the unpivoting of various financial lines. 

 

However, the point of this template is that I can throw random datasets of dimensions into my analysis. For example, my current analysis Dim_001 is productID. I tried to replace it with another dataset where the column header (after header promotion) was intially product_ID. When I updated the query, the relationship was deleted. 

 

However, when I changed the raw data to "productID", then the relationship would prevail after updating. 

 

My question is how do relationships work after updating queries, and is there a way to make it so that as long as the final name is the same in the old query and updated query, for the relationship to prevail and not be deleted. 

 

Please let me know if extra information is required.

 

Sid

3 REPLIES 3
parry2k
Super User
Super User

@Phogon I would expect the relationship to prevail if column name is the same for the updated query which seems like not working for you, correct?

 

Is the data source changing? Like changed from CSV to SQL or vice versa?






Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





The data type is exactly the same. Its very very strange. 

 

Basically the issue now is that if the raw data name after "promote to header"step is different, then the newly updated information will break the relationship. 

 

Would it be helpful if I uploaded my DAX file?


Regards

This comment right here. THANK you!

“Basically the issue now is that if the raw data name after "promote to header" step is different, then the newly updated information will break the relationship.”

 

I don't know if this is a bug or by design but I was going nuts having lost a ton of relationships when patching some data from Excel. 

 

Open Excel, rename column THERE, refresh preview, relationships persist.

 

I don't know why, but this worked. Thanks for leaving the breadcrumb.

 

Helpful resources

Announcements
November 2022 Update

Check it Out!

Click here to read more about the November 2022 updates!

Difinity Conference

Difinity Conference 2022

Difinity is the largest Microsoft Data, AI, Power BI, Power Platform and Business Applications Conference in New Zealand.

European Share Point Conference

European Share Point Conference

This conference returns live and in-person in Copenhagen this 28 November-01 December with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Microsoft 365 Conference â__ December 6-8, 2022

Microsoft 365 Conference - 06-08 December

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.