Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
This seems to be super simple but for some reason I am getting an error message that says I can't create a relationship between these two columns becasue one of the columns mush have a unique values. I am trying to use PEN ID as the join criteria. Any help would be appreciated.
Here is what I have in my two tables.
Pen Table:
Pen ID | PEN |
5001 | 1 |
5002 | 2 |
5003 | 3 |
5004 | 4 |
5005 | 5 |
5006 | 6 |
5007 | 7 |
5008 | 8 |
5009 | 9 |
5010 | 10 |
5011 | 12 |
5012 | 14 |
5013 | 16 |
5014 | 18 |
5015 | 20 |
5016 | 21 |
5017 | 23 |
5018 | 24 |
5019 | 99 |
FFAPOC Table: There are other columns but they are not relevant to the relationship.
DATE | Pen ID | PEN |
09/26/2016 | 5016 | 21 |
09/26/2016 | 5017 | 23 |
09/27/2016 | 5016 | 21 |
09/27/2016 | 5017 | 23 |
09/28/2016 | 5016 | 21 |
09/28/2016 | 5017 | 23 |
09/29/2016 | 5019 | 99 |
09/29/2016 | 5016 | 21 |
09/29/2016 | 5017 | 23 |
09/30/2016 | 5019 | 99 |
Solved! Go to Solution.
Great, will you accept this as a solution?
Proud to be a Super User!
one of the tables in the relationship must have unique values, i.e FFAPOC should be the many side and the pen should be on the one side i am assuming? you therefore need to clear out the duplicates of pen.
the best way to check if you have duplicates is to create 2 measures on the table
no of rows = countrows(pen)
count unique values = distinctcount('pen'[pen])
if those 2 numbers are the same then you good if you have more rows than unique values you have duplication going on
stick them on a matrix and sort by nowofrows to find offending pen
also if you have any blank fields in pen that will also create an issue, pad those values with a -1 (something that has no business value)
Proud to be a Super User!
@vanessafvg Thank you so much. Looks like PowerBi was seeing the blanks as nulls and counting those. This little trick was awesome and was able to create the relationships.
Great, will you accept this as a solution?
Proud to be a Super User!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
78 | |
78 | |
58 | |
35 | |
31 |
User | Count |
---|---|
99 | |
59 | |
56 | |
46 | |
40 |