I have two tables named TableOne and TableTwo. I want to display a table or matrix in my report that will give me all the towns that are in TableOne, but not in TableTwo. In the example below I want to be able to display the three red tables. Please see the attachment. Thank you in advance. T
Forum Discussion
Compare two tables in Power BI
Compare two tables in Power BI
6 Replies
- PC2790Community Champion
Hello AdamOsmond ,
You can do it in PowerQuery using a simple Mquery code.
Attached is the sample report for your reference.
Thanks
- AdamOsmondNew Member
I can't open the file you sent me.
- AdamOsmondNew Member
I was able to open it, but I'm new to Powe BI. Can you tell me the steps you did to get the new table? Thank you
- PC2790Community Champion
Sure.
Go to Power BI desktop --> TransformData
In home --> New Source--> Blank Query
In there, go to Advanced Editor and replace all the code with:
let addedT1_= List.Difference(TableOne[Name],TableTwo[Name]) in addedT1_Advanced Editor:
And your job is done.
Attaching the file here again
- v-henryk-mstfCommunity Support
Hi AdamOsmond ,
I think PC2790 has explained the implementation steps more clearly. If there is still confusion about specific links, please point it out.If the problem has been solved you can mark the reply for the standard answer to help the other members find it more quickly.
Best Regards,
Henry- AdamOsmondNew Member
Please help: I want to be able to select a person from slicer numbered 1, and then any town that is not in table 2 to be listed in table 3. Table 2 and Table 3 have a relation in a field named "Town". Please see the picture attached here. Thank you in advance.