Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Count using 2 tables

Hello,

 

Sorry for the title, I don't know how to resume my question

 

I have 2 tabs A and B which have a same column "Club". Club is so the relation between A and B (1:*)

I would like to use DAX to create in A a new column to count for each Club, how many time it is present in B 

 

Thank you and have a good weekend !

 

  • Hi Anonymous 

    You can create a  calculated column in table Aas follows:

    NewColumn = CALCULATE(COUNTROWS(TableB))

     

     

    Please mark the question solved when done and consider giving kudos if posts are helpful.

     

    Cheers  Datanaut

  • Hi Anonymous 

    try  a measure

     

    =calculate(countrows('B'[Club]))

     

    it should be enough in row context

    do not hesitate to give a kudo to useful posts and mark solutions as solution

3 Replies

  • AlB's avatar
    AlB
    Icon for Community Champion rankCommunity Champion

    Hi Anonymous 

    You can create a  calculated column in table Aas follows:

    NewColumn = CALCULATE(COUNTROWS(TableB))

     

     

    Please mark the question solved when done and consider giving kudos if posts are helpful.

     

    Cheers  Datanaut

  • az38's avatar
    az38
    Icon for Community Champion rankCommunity Champion

    Hi Anonymous 

    try  a measure

     

    =calculate(countrows('B'[Club]))

     

    it should be enough in row context

    do not hesitate to give a kudo to useful posts and mark solutions as solution

  • Anonymous's avatar
    Anonymous
    Not applicable

    It works perfectly and I could use it in others request more specific 

    Thank both of you !