Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I have two Excel tables, one with the master data and one with translations for rule violations.
In Excel 1, I have a colume that lists the error causeing the load violation in each individual report uploaded to a repository. These might be repeated throughout the report as one upload might have an error 'WMAC03_IM_CR_MSEG_LIFNR' occuring 25 times in the file. A separate report might have that error 62 times and so on.
I then have Excel 2 listing the 'English' translation of these errors. eg. 'WMAC03_IM_CR_MSEG_LIFNR' is translated to 'Assign the correct Vendor number to this cell.' in both files I have RULE_NAME as the error code listed.
In my dashboard, I want BI to show the 'English' Translation if it sees a certain error listed.
I have tried to link these two files but I get 'You Can't create a Relationship between these two columns bacause one of the columns must have Unique values'. I have double / tripple checked, removed duplcates from the excel and ran a quirie in BI to remove duplicates from the RULE_NAME feild in Excel 2 and none are there. So the Excel 2 is made of uniquie values in Colume 1. There is also no blanks or Nulls I can see.
Any Ideas how i can link the two feilds?
Thanks
Solved! Go to Solution.
Hm, that's a bit strange.
Then trim and clean the column (s in both tables) as well - before removing duplicates. You find these commands under the lowercase.
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
could you have the same rules but in different cases? i am assuming you did the remove duplicates in Power Query? I think power query is case sensitive, however i could be wrong.. but its just a thought.
Proud to be a Super User!
Yes, good thought, but takeing a look through, some do occur in lower cases, but are still unique.
The first few Characters in the string though are not unique, eg, QTIC06_CR_KONA_BOART + QTIC06_CR_KONA_KBETR + QTIC06_CR_KONA_KBRUE. Is there a limit on the lookup string value? So when judging if something is unique, its only looking at first 5 or 10 characters?
no i wouldn't think so. have you done a group by on the table with a count to double check there no duplicates?
Proud to be a Super User!
Tried that just now (I hadn't before) and yep, no duplicates.
and the data types are the same?
Proud to be a Super User!
Yep, Both Text.
The query editor is case sensitive while the data model isn't.
So in order to be on the safe side here, I'd recommend to:
1) tranform both key column to lowercase (or uppercase)
2) then remove dups again
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Okay, great,
Is there a quck way of doing that? There is over 1600 values.
Sure, that's what the query-editor is meant for:. Check the column, and then:
1) lowercase
2) remove dups
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Thank you ImkeF,
Compleated that, converted everything to Uppercase in both tables and removed duplicated in Column 1 in Excel 2 'RULE_NAME', still no luck in getting them to connect.
Would it matter if a value in Column 1 is also in Column 2 of Excel 2? Not all the rules have a translation, so the rule is just repeated in the translation column. If I remove them might that help?
Hm, that's a bit strange.
Then trim and clean the column (s in both tables) as well - before removing duplicates. You find these commands under the lowercase.
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Trim and Clean worked!
Thank you so much, this has been driving me demented for weeks!
Now to just get it to pull the english value and I'm all set!
Thank you ImkeF!
That's good!
So what happened here is that your unique values-to-be haven't been unique, but contained either blanks (trim) or non-printable characters (clean).
So you've lost some rows in your lookup-table here and might have to check if this causes problems now. What remove duplicates does is to keep the first row it finds.
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
99 | |
80 | |
70 | |
59 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |