Forum Discussion

jk1's avatar
jk1
New Member
9 years ago
Solved

Comparing columns in two different tables

Hey everyone! I'm new to PowerBI and I'm very interested in learning more about it.

Let's say I have a couple of csv files with 1)a list of pokemon names and type etc... 2) a list of people that I have with also other columns DOB, Address, etc..

How can I calculate the number of people that have the same first name as a pokemon? 

Also if you guys have any suggestions for a new user please let me know!

Thank you!

  •  

    hi jk1

     

    Try this: Change the name of tables and columns accord to your data

     

     

    CountNames =
    COUNTROWS (
        FILTER (
            Table2,
            Table2[First Name]
                = LOOKUPVALUE (
                    PokemonTable[Pokemon Name],
                    PokemonTable[Pokemon Name], Table2[First Name]
                )
        )
    )

1 Reply

  • Vvelarde's avatar
    Vvelarde
    Community Champion

     

    hi jk1

     

    Try this: Change the name of tables and columns accord to your data

     

     

    CountNames =
    COUNTROWS (
        FILTER (
            Table2,
            Table2[First Name]
                = LOOKUPVALUE (
                    PokemonTable[Pokemon Name],
                    PokemonTable[Pokemon Name], Table2[First Name]
                )
        )
    )