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.
I have two lists or columns. One with the answers made by some people (LIST_1) and the second with the correct alternatives (LIST_2). How can I, in POWER QUERY, return the number of lines that match?
I speak list or column, because I would imagine that finding the lines that coincide as a list would be the best way. But, if possible as a column, it can also be useful.
Solved! Go to Solution.
Hi, @PietroFarias
let
List_1 = {"E", "B", "C", "B", "E", "B", "C", "E", "E", "C", "A", "E"},
List_2 = {"A", "A", "A", "B", "C", "D", "E", "B", "D", "C", "A", "B"}
in List.Count(List.Select(List.Zip({List_1,List_2}),each _{0}=_{1}))
If my code solves your problem, mark it as a solution
ziying35
Hey @PietroFarias ,
We can achieve this using this simple technique also:
Exepected Output:
Step1 : Add a conditional column
Then Click on OK
If your problem is solved then please accept this as solution.
Thank you
Hi, @PietroFarias
let
List_1 = {"E", "B", "C", "B", "E", "B", "C", "E", "E", "C", "A", "E"},
List_2 = {"A", "A", "A", "B", "C", "D", "E", "B", "D", "C", "A", "B"}
in List.Count(List.Select(List.Zip({List_1,List_2}),each _{0}=_{1}))
If my code solves your problem, mark it as a solution
ziying35
Hi @PietroFarias ,
Try this m code:
let
List_1 = {"E", "B", "C", "B", "E", "B", "C", "E", "E", "C", "A", "E"},
List_2 = {"A", "A", "A", "B", "C", "D", "E", "B", "D", "C", "A", "B"},
Match = Table.RowCount(Table.SelectRows(Table.FromColumns({List_1, List_2}), each [Column1] = [Column2]))
in
Match
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.