Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Count blanks in a matrix

Hi Folks,

 

I have the below matrix visual:

I used blue to just block out names. The red is a conditional to identify blanks.

 

I am using three fields: 

  Manager Name as the ROW

  Employee Type as the COLUMNS (Two values - Employee or Contingent Worker)

  Employee Number as the VALUES and using the COUNT option not COUNT DISTINCT.  

 

This gives me how many employees and contingent workers each manager has. 

 

What I want to do is COUNT how many blanks are in the EMPLOYEE column. I don't care about the Contingent Worker column.

 

Is this possible? If so, how do I do it. I'm rather stuck. 

 

Many thanks!

 

 

  • Hi Anonymous

     

    Try this MEASURE

     

    Count =
    VAR Temp =
        FILTER (
            SUMMARIZE (
                Table1,
                Table1[Manager Name & ID],
                "Count", CALCULATE (
                    COUNT ( Table1[Employee Number] ),
                    Table1[Employee Type] = "Employee"
                )
            ),
            [Count] = 0
        )
    RETURN
        COUNTROWS ( Temp )

     

2 Replies

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

    Hi Anonymous

     

    Try this MEASURE

     

    Count =
    VAR Temp =
        FILTER (
            SUMMARIZE (
                Table1,
                Table1[Manager Name & ID],
                "Count", CALCULATE (
                    COUNT ( Table1[Employee Number] ),
                    Table1[Employee Type] = "Employee"
                )
            ),
            [Count] = 0
        )
    RETURN
        COUNTROWS ( Temp )

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      That worked like a charm. THANK YOU.