Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Count multiple items

I have a table that has a status column and it lists the following three options:

 

In Progress

Complete

Late

 

I want to count only the number of items listed as In Progress and Late. 

 

I know how to do it for one, but don't know how to calculate the number of items for more than one status. 

  • Hi,

    I am not sure how your datamodel looks like, but I tried to create a sample pbix file like below.

    Please check the below picture and the attached pbix file.

    I hope the below sample can provide some ideas on how to create a solution for your datamodel.

     

     

     

    Progress or late count measure: =
    COUNTROWS ( FILTER ( Project, Project[Status] IN { "In Progress", "Late" } ) )
    

     

     

     

2 Replies

  • Hi Anonymous !
    You can do the following:

    CALCULATE(
    	COUNT( ItemsColumn ),
    	StatusColumn IN {"In Progress", "Late"}
    )

    Let me know if that helps!

  • Hi,

    I am not sure how your datamodel looks like, but I tried to create a sample pbix file like below.

    Please check the below picture and the attached pbix file.

    I hope the below sample can provide some ideas on how to create a solution for your datamodel.

     

     

     

    Progress or late count measure: =
    COUNTROWS ( FILTER ( Project, Project[Status] IN { "In Progress", "Late" } ) )