Forum Discussion

nosirui54's avatar
nosirui54
Helper I
4 years ago
Solved

Count Multiple Cell Values and Without Counting Blank Cell

Please i need help i counting all the value in the cell fileds as unique count without counting the blank cell, and have the total unique count sum up. As shown in the Pictures, please what measures ...
  • VahidDM's avatar
    VahidDM
    4 years ago

    Hi nosirui54 

     

    If you need a column use this code:

     

    Column =
    CALCULATE (
        COUNT ( 'Table'[Months] ) + COUNT ( 'Table'[Year] )
            + COUNT ( 'Table'[Number] )
            + COUNT ( 'Table'[FIPS] )
            + COUNTA ( 'Table'[Postal_Code] )
            + COUNT ( 'Table'[State] )
            + COUNT ( 'Table'[County] ),
        FILTER ( 'Table', 'Table'[Months] = EARLIER ( 'Table'[Months] ) )
    )

     

     

    Output:

     

    If you need a measure:

    Measure = 
    CALCULATE (
        COUNT ( 'Table'[Months] ) + COUNT ( 'Table'[Year] )
            + COUNT ( 'Table'[Number] )
            + COUNT ( 'Table'[FIPS] )
            + COUNTA ( 'Table'[Postal_Code] )
            + COUNT ( 'Table'[State] )
            + COUNT ( 'Table'[County] ),
        FILTER ( 'Table', 'Table'[Months] = max ( 'Table'[Months] ) )
    )

     

    Output:

     

    If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
    Appreciate your Kudos!!
    LinkedIn: 
    www.linkedin.com/in/vahid-dm/