Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
I have two tables to which I've added a merged column using Power Query "Merged Column" option. Both columns have the same fields and I am able to create a relationship. However the relationship doesn't work. PowerBI doesn't recognize that those are the same fields (I know because I've tried to look them up using LOOKUPVALUE but it returns empty cells). I've tried trimming in power query but doesn't help. Anyone knows what may be happening?
One column in plan fact table:
The other one in dim_calendar table:
Thanks!
Solved! Go to Solution.
The problem is that the fields do not match:
Changing the field in the calendar table (YearMonth)
Proud to be a Super User!
Paul on Linkedin.
Sorry, this may sound obvious, but are you sure the relationship links both columns (and not some other field?)
If so, it might be worth trimming and cleaning both columns just in case
Proud to be a Super User!
Paul on Linkedin.
How does the relationship not work? Can you create the relationship without problems, or do you get errors?
What column are you using for merging on the two tables? Could there be a way for all this without merging anything, just using relationships?
It seems strange to me that your plan fact has those months as a column (instead of just a date), but I can't put my finger on it without seeing the system as a whole.
I can create a relationship with no issues and it is active.
The reason why I'm merging is that the plan is created on the month granularity while all other fact tables are on the date granularity. If I create a relationship based on the year field the split by month doesn't work and if I create a relationship based on the month field the split by year doesn't work. Hence I'm creating a merged year + month.
Try creating a table visual with both columns and see if the rows match
Proud to be a Super User!
Paul on Linkedin.
Here's what I got in the visual. Blanks from dim_calendar field:
I take it the relationship is one-to-many from the dim calendar down to the fact table. If so, you need to make the calendar table column the parent in the matrix (or use a Table visual instead)
Proud to be a Super User!
Paul on Linkedin.
No matter how I put in the table, dim_calendar field shows blanks:
Below the link to the pbix file with the source files included where I carved out the data that causes the issue. Relationship is connecting the right fields. I didn't do trimming in this file but I tried in the original one and didn't help.
The problem is that the fields do not match:
Changing the field in the calendar table (YearMonth)
Proud to be a Super User!
Paul on Linkedin.
Wow, this is embarassing. I checked this multiple times and didn't notice. I must have been fooled by the order of columns when merging while it is order of selecting them that matters. Sorry for bothering and thanks for clarifying.
No probs. Most of us have been through that! And a fresh pair of eyes normally helps (a bit like proof-reading)
Proud to be a Super User!
Paul on Linkedin.
User | Count |
---|---|
66 | |
60 | |
47 | |
33 | |
32 |
User | Count |
---|---|
87 | |
72 | |
56 | |
49 | |
45 |