Forum Discussion
Measure Not Working using business Key (Looks like the relationships aren't there but they are)
I am looking into an issue for someone who has an excel source and has created a data model in Power BI (Star Schema)
Renumeration Metrics and Dim were in the same table but in Power BI we split out the data. Added a column to get the Average Salary Grouping. Created a Key. then moved that key into the metrics table. Then deleted the text items in the fact table that allowed us to merge the Key into the fact table.
There are only a few rows in the renumeration dim
And we have a base measure
3 Replies
- DebbieE
Community Champion
I found it. It doesnt look like the renumeration dim was created properly when it was split from the metrics. It hasnt been deduped so I can go back to power Query editor and get that fixed
- DebbieE
Community Champion
What had happened I think is that the Renumeration dim was split off from the Renumeration Fact data and then a few more data items were added along the way and this table should have been made distinct with only a few rows in it.
Because of the changes the Distinct rows hadnt been done so it had everything in it. Which meant the join wasnt working properly.
We went it, Reset the Distinct Rows. then created the Key, then Merged the Key into the Fact table using a concatenated list of strings from the dim table we had left in the fact. Then removed the string columns from the fact table. And the problem was sorted.
I really dont like creating models in Power BI because of all this. I much prefer doing them in a source database which avoids that kind of complexity. Glad we spotted it