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.
I need to capture the data from the 'Answer' Column in Table1 into the new 'Answer' column in Table2. Where the tables have a many to many relationship in the Column 'Names'. And if there is no match for 'Names' give me the text "No". My current code is :
let
Source = Table2,
#"Added Custom" = Table.AddColumn(Source, "Answer", each Table1[Answer]{List.PositionOf(Table1[Names],[Names])}),
#"Replaced Errors" = Table.ReplaceErrorValues(#"Added Custom", {{"Answer", "No"}})
in
#"Replaced Errors"
This works but takes a couple minutes to run. Suggestions for a faster way? Maybe Table.Buffer but I can't figure out the syntax to use with my current code.
(My tables have under 1000 records in them so it shouldn't be taking that long.)
Solved! Go to Solution.
I ended up adding a column with "= Table.ReplaceValue(#"Replaced Errors",null,"No",Replacer.ReplaceValue,{"SelfMed"})" as the code.
I ended up adding a column with "= Table.ReplaceValue(#"Replaced Errors",null,"No",Replacer.ReplaceValue,{"SelfMed"})" as the code.
Hi @elkay73
As highlighted by @lbendlin , the proposed approach appears to effectively address your requirements. Could you please confirm if your issue has been resolve
If you are still facing any challenges, kindly provide further details, and we will be happy to assist you.
If the above information is helpful, please give us Kudos and mark the response as Accepted as solution.
Best Regards,
Community Support Team _ C Srikanth.
Instead of replacing errors use try ... otherwise ... in the original query.
Please provide sample data that fully covers your issue.
Please show the expected outcome based on the sample data you provided.
It's not power query but you could create a DAX calculated column on the Table2 table for this:
Answer =
IF( ISBLANK(SelectedValue('Table1'[Answer])), "No", SelectedValue('Table1[Answer])
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 |
---|---|
58 | |
55 | |
54 | |
38 | |
29 |
User | Count |
---|---|
78 | |
62 | |
45 | |
40 | |
40 |