Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
AmateurBI
Regular Visitor

Column comparison

Hi everybody,

 

i'm completely unfamiliar with PowerBI and just started using ist two days ago. I am getting a list of product names every month. That list is constantly growing and already to big to open it in Excel. I tried to open it with Notepad ++ and split it into different sheets but that doesn't work, either...

 

What I want to do is, upload the lists that come in every month and compare it to one from the month before and see which names are still in the list and which ones disappeared. Is that possible? I tried to do it with a Related function and joins, but it won't work out...

 

Can anyone help me out?

 

1 ACCEPTED SOLUTION

@AmateurBI,

 

You need to expand this table.
Capture.PNGCapture1.PNG

 

Regards,

Charlie Liao

 

View solution in original post

6 REPLIES 6
Greg_Deckler
Super User
Super User

You should be able to do this in M code, just a simple join (Merge) query.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

How and where can I do that exactly? I was able to join the two tables, but the result was incorrect

@AmateurBI,

 

You could use Merge queries feature. 
Sample data:

Product name for Jan  

Product Name
A
B
C
D
E
F
G
H
I
J
K
L

Product name for Feb

Product Name
B
D
E
F
G
Y
I
J
K
M

 

Edit query>Merge queries
Capture.PNG

Results
Capture1.PNG

For the null row which indicates the product names disappear, for the rows that have values, it indicates the product names are still in the list.

 

Reference

https://powerbi.microsoft.com/en-us/documentation/powerbi-desktop-shape-and-combine-data/

 

Regards,

Charlie Liao

Hey Charlie,

 

thank you so much for your reply! I tried to put whatever comes out of the in a new table with merge as new query (My PowerBi is in German, not sure whether translation is correct) because when I just tried to merge the queries this appeared:

 

Unbenannt.PNG

 

This is the code that is displayed: = Table.NestedJoin(#"March",{"Names"},#"April",{"Names"},"NewColumn",JoinKind.LeftOuter)

 

So I don't really understand why PowerBi is just adding a new column? And there is only the expression "Table" in it?

 

When i put it in a new empty query it worked better, but now of course I can't really see the names that disappeared, but only the names that matched in both columns...

 

= Table.NestedJoin(#"March",{"Names"},#"April",{"Names"},"NewColumn.1",JoinKind.LeftOuter)

@AmateurBI,

 

You need to expand this table.
Capture.PNGCapture1.PNG

 

Regards,

Charlie Liao

 

That was exactly, what I was looking for! Thank you so much

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.