Forum Discussion

Kesorte's avatar
Kesorte
New Member
9 years ago

COUNTIFS on PowerPivot

Hello

Im advance excel user, but totally new on powerpivot.

 

I have 2 tables (Call and Cart) and i need to count how many times it repeat a value Call[CunoMes] on a Colum Cart[1]

 

 

How can i do this? I was reading about DAX function, but as i said at first, im totally new (and noob) on PB.

 

Thank ypu all!

 

 

 

 

 

 

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Likely, you will want to create a relationship between Call[CunoMes] and Cart[1].  It's not super clear to me if you have a 1 to many relationship between these tables... or if 1 of these columns has only unique values?

     

    Assuming you have the relationship you can use =COUNTROWS(TableName) to count rows, and break it out by "the other table" :)

    • Kesorte's avatar
      Kesorte
      New Member

      [1] is the name of column (bad name, i know)

      i dont know if i made a relationship. I just import this tables of SQL consult from diferent servers (microsoft Dynamics views)

      So, for example:

      - In Call table, column [CunoMes] i have all my Customers ID and its repeat X times.
      - In Cart Table, Column [1] i have all my Customers ID with no repeat

      So, i want to create a new column on Cart Table with the times that Costumer ID it repeat on Call Table[CunoMes]

      (sorry my english)

      • Anonymous's avatar
        Anonymous
        Not applicable

        From the diagram view, go drag between the 2 columns to create the relationship.

  • v-caliao-msft's avatar
    v-caliao-msft
    Microsoft Employee

    Kesorte,

     

    You could create a calculated column in Call table using the DAX below.

    Column = CALCULATE(COUNT(Cart[1]),FILTER(ALL(Cart),Cart[1]='Call'[CunoMes]))

     

    Regards,

    Charlie Liao