The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I have two tables namely TABLE and TABLE (2) and I want a DIFFERENCE TABLE (TABLE (2) - TABLE) such that I want to see values from TABLE (2) that are not present in TABLE. I used EXCEPT function for this but it does not seem to work as I expected. Both the tables are identical in column headers except the values. I am also attaching a sample .pbix file. I don't understand why is this not working although the definition of EXCEPT says that it takes values from first table not present in second one. Please help.
Thanks
EXCEPT.NOTWORKING pbix file
Solved! Go to Solution.
Hi @Anonymous ,
In the sample pbix you provided, although the columns are identical in both tables, none of the rows in TABLE (2) match what is in TABLE. Thats why the except is returning all the rows from TABLE (2).
All the values in the row have to match for it to be excluded.
for example, in your pbix file, even though column3 in TABLE has ijk and Column 3 in Table(2) has ijk, column1 and column2 of TABLE dont match what is in TABLE (2) for that same row. So it is not considered a match.
When I changed the source table so they matched, you can see that the Difference Table now shows that row as excluded.
What is your expected output? That would help in coming up with a solution.
Hi @Anonymous ,
In the sample pbix you provided, although the columns are identical in both tables, none of the rows in TABLE (2) match what is in TABLE. Thats why the except is returning all the rows from TABLE (2).
All the values in the row have to match for it to be excluded.
for example, in your pbix file, even though column3 in TABLE has ijk and Column 3 in Table(2) has ijk, column1 and column2 of TABLE dont match what is in TABLE (2) for that same row. So it is not considered a match.
When I changed the source table so they matched, you can see that the Difference Table now shows that row as excluded.
What is your expected output? That would help in coming up with a solution.
Thanks. That does explain why it is behaving absurdly. Now I can fiddle around with my orginial pbix. Regards.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
113 | |
80 | |
77 | |
43 | |
39 |
User | Count |
---|---|
150 | |
116 | |
66 | |
64 | |
55 |