Forum Discussion

jthomson's avatar
jthomson
Icon for Solution Sage rankSolution Sage
9 years ago
Solved

Count instances of string in multiple columns

Hi,   Been searching the forums but can't find anything that exactly replicates what I'm trying to do - I currently have an Excel file that has the following column names (along with various others...
  • Vvelarde's avatar
    9 years ago

    jthomson

     

    Hi try with this:

     

    CountinAllHirerColumns =
    CALCULATE (
        COUNTROWS ( Table1 ),
        USERELATIONSHIP ( HirerTable[Hirer], Table1[Hirer 1] )
    )
        + CALCULATE (
            COUNTROWS ( Table1 ),
            USERELATIONSHIP ( HirerTable[Hirer], Table1[Hirer 2] )
        )
        + CALCULATE (
            COUNTROWS ( Table1 ),
            USERELATIONSHIP ( HirerTable[Hirer], Table1[Hirer 3] )
        )

    After that in your visual filter:

     

     

    Regards

     

    Victor

    Lima - Peru