March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I have the following datamodel (inactive relationships are intentional)
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
@Anonymous 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?
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
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.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
User | Count |
---|---|
91 | |
90 | |
83 | |
73 | |
49 |
User | Count |
---|---|
167 | |
149 | |
98 | |
73 | |
57 |