Forum Discussion

mbailey's avatar
mbailey
Icon for Helper II rankHelper II
4 years ago
Solved

COUNTAX not working properly

Hi,

I have a table with example data like this:

In this example, it is filtered to one Unit/Partner Name, but the table contains many combinations of Units/Partners.

You can see in this example there are 6 total records with 1 record as a Priority of Emergency, and 4 have High.

I'm trying to create a measure that will count the total of each to be used in a Matrix  but, the results, for this example, show 6 for each:

 

This is the formula I'm using: 

High Priority Count = COUNTAX(DMTA_Service_Report, DMTA_Service_Report[priority] = "High")
 
What am I doing wrong?
 
Thanks,
Mike

 

 

 

 

  • mbailey Try:

    High Priority Count = COUNTROWS(FILTER(DMTA_Service_Report, DMTA_Service_Report[priority] = "High"))
  • COUNTAX returns the number of values that are non-blank and DMTA_Service_Report[priority] = "High" is either true or false for each row, not blank.

     

    I think you want something more like

    High Priority Count =
    COUNTROWS (
        FILTER ( DMTA_Service_Report, DMTA_Service_Report[priority] = "High" )
    )

2 Replies

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

    mbailey Try:

    High Priority Count = COUNTROWS(FILTER(DMTA_Service_Report, DMTA_Service_Report[priority] = "High"))
  • COUNTAX returns the number of values that are non-blank and DMTA_Service_Report[priority] = "High" is either true or false for each row, not blank.

     

    I think you want something more like

    High Priority Count =
    COUNTROWS (
        FILTER ( DMTA_Service_Report, DMTA_Service_Report[priority] = "High" )
    )