SOLVED
Home

Power Query - compare list of values with a column as COUNTIF Excel formula.

%3CLINGO-SUB%20id%3D%22lingo-sub-172235%22%20slang%3D%22en-US%22%3EPower%20Query%20-%20compare%20list%20of%20values%20with%20a%20column%20as%20COUNTIF%20Excel%20formula.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-172235%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%0A%3CP%3EIn%20Power%20Query%20I%20have%20a%20table%20with%206%20column%20%3A%20%5BA%5D%2C%20%5BB%5D%2C%20%5BC%5D%2C%20%5BD%5D%2C%20%5BE%5D%2C%20%5BF%5D%20each%20as%20Text.%3C%2FP%3E%0A%3CP%3EI%20need%20a%20new%20one%20to%20check%20if%20at%20least%20one%20of%20column%20%5BA%5D%20to%20%5BE%5D%20has%20the%20same%20value%20than%20%5BF%5D.%3C%2FP%3E%0A%3CP%3EI%20tried%20the%20function%20%22List.MatchesAny%22%20with%20the%20following%20syntax%20%3A%3C%2FP%3E%0A%3CP%3E%3CEM%3EList.MatchesAny(%7B%5BA%5D%2C%20%5BB%5D%2C%20%5BC%5D%2C%20%5BD%5D%2C%20%5BE%5D%7D%2C%20each%20_%20%3D%20%5BF%5D)%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3EBut%20it%20doesn't%20work.%3C%2FP%3E%0A%3CP%3ESomeone%20to%20help%20me%20%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-172235%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EGet%20%26amp%3B%20Transform%20Data%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPower%20Query%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-172262%22%20slang%3D%22en-US%22%3ERe%3A%20Power%20Query%20-%20compare%20list%20of%20values%20with%20a%20column%20as%20COUNTIF%20Excel%20formula.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-172262%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Sergei%2C%3C%2FP%3E%0A%3CP%3ESo%20simple%20with%20the%20right%20function%20!%3C%2FP%3E%0A%3CP%3EThx%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-172257%22%20slang%3D%22en-US%22%3ERe%3A%20Power%20Query%20-%20compare%20list%20of%20values%20with%20a%20column%20as%20COUNTIF%20Excel%20formula.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-172257%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Kriss%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ECould%20be%20like%3C%2FP%3E%0A%3CPRE%3Eeach%20List.Contains(%7B%5BA%5D%2C%5BB%5D%2C%5BC%5D%2C%5BD%5D%2C%5BE%5D%7D%2C%5BF%5D)%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Deleted
Not applicable

Hi,

In Power Query I have a table with 6 column : [A], [B], [C], [D], [E], [F] each as Text.

I need a new one to check if at least one of column [A] to [E] has the same value than [F].

I tried the function "List.MatchesAny" with the following syntax :

List.MatchesAny({[A], [B], [C], [D], [E]}, each _ = [F])

But it doesn't work.

Someone to help me ?

2 Replies
Highlighted
Solution

Hi Kriss,

 

Could be like

each List.Contains({[A],[B],[C],[D],[E]},[F])

 

Hi Sergei,

So simple with the right function !

Thx

Related Conversations
Converting InfoPath to PowerApps
kywest in SharePoint Developer on
12 Replies
Power Bi Reports - Turn off "See Records"
Andrew Fitzgerald in Education on
1 Replies
Power Query Source from Relative Paths
Magnus Vegem Dahle in Excel on
10 Replies
Teams and Power Query Excel file
Mark_Adams in Microsoft Teams on
6 Replies