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
Sudheeshp
Frequent Visitor

Compare two cell values

I want to compare two cell values in column 'Unique Customer', and 'Promo ID'.  Unique Customer value can be repeatable,  based on the date, with or without 'Promo ID'.  I like to create a new column looking up entire column of unique Customer.  if any of the unique customer containts Promo Id, I want to tag that Unique Customer as Y.  Please help.  

   This is not in my Excel folder source
   New Column
Unique CustomerPromo ID VFP Customer
A AHAMED LEBBE/MANSO222023 Y
A AHAMED LEBBE/MANSO  Y
AABID/MAHMMOUDMR222023 Y
AABID/MAHMMOUDMR  Y
AABOEN/STIANMR  N
AADITYA  N
1 ACCEPTED SOLUTION

Just paste the code I have provided in formula bar.

''YourPreviousStepName'' was just a place holder for the previous step in your query.

Jakinta_0-1680547143416.png

 

Since it has more than 1 word in its name it should be formated as #"Unique Customer".

 

View solution in original post

4 REPLIES 4
Sudheeshp
Frequent Visitor

Dear Jakinta, 

Much appreciated the help.  

Jakinta
Solution Sage
Solution Sage

You can try with step below after your step/table with columns "Unique Customer" & "Promo ID".

 

= Table.RemoveColumns ( Table.Combine( Table.Group( Table.DuplicateColumn( YourPreviousStepName, "Promo ID", "Helper"), {"Unique Customer"}, {{"A", each Table.AddColumn (Table.FillDown (Table.FillUp (_, {"Helper"}), {"Helper"}), "VFP Customer", each if [Helper] <> null then "Y" else "N" ), type table }})[A]), "Helper")

 

 

Jakinta_1-1680538157438.png

 

 

Much appreciated your help.  However please see the error as shown in the photo

Sudheeshp_1-1680538885232.png

 

 

 

Just paste the code I have provided in formula bar.

''YourPreviousStepName'' was just a place holder for the previous step in your query.

Jakinta_0-1680547143416.png

 

Since it has more than 1 word in its name it should be formated as #"Unique Customer".

 

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.

Top Solution Authors
Top Kudoed Authors