So, I’ve been messing around with this project, right? And I hit a snag that took me some time to figure out. The title kind of gives it away – it’s about relationship values not doing what I expected them to do. I’ll walk you through what happened.
I started by setting up these two tables. I won’t bore you with all the details, but let’s just say they had a bunch of stuff in them. And importantly, they were related through this ‘ItemCode’ thing. I made sure both tables had unique ‘ItemCode’ values – no duplicates. Thought I was being smart about it.
Then, I jumped into Power BI, because that’s what I use for data visualization, and I configured this many-to-one relationship between the tables. I was expecting that when I pull data from both tables, it would all line up nicely because of this relationship. You know, like how it usually works.
But nope. It didn’t work as expected. At all. I was getting all sorts of weird results. I double-checked the relationship, checked the data types, made sure everything was spelled right, but nothing. Still messed up. I even tried using this LOOKUPVALUE function that someone told me about, which is supposed to work regardless of relationships, but even that didn’t help.
I started digging around online, reading forums, and all that. I found out that sometimes, Excel can be a bit funny with data models. Like, if you don’t format cells right before you enter formulas, it can throw everything off. But that wasn’t it either.
Then I stumbled upon some posts talking about how relationship values might not be acceptable for the current resource state. It was something about pre-release builds, which didn’t really apply to me, but it got me thinking.
I went back to my tables and started playing with the values. I had this one value that wasn’t an integer. I thought, “Maybe that’s it.” So, I converted it into an integer by adding 0. And guess what? I found that if the data model relationship is not working in Excel, I get a message that no relationship is detected. It seems I have configured this many-to-one relationship in Power BI but it is not working as expected. Though the values are exactly the same, I need to convert them to numbers.
I ran my visualizations again, and boom – everything worked perfectly. It was all because of that one value not being a proper integer. I fixed that and it fixed everything.
So yeah, that’s my story of how a tiny data type issue threw a wrench in my project. It was a good reminder to always double-check the basics, even when you think you’ve got everything right.