Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
qwerttty
Helper I
Helper I

Count occurrence

Hi, I'm trying to calculate the amount of open and closed count in the matrix. 

I'm using the measure below, however it gives me the sum of open and closed in the column, are there any ways to solved it to make the value same as the card 
Count = SUMX(VALUES(Sheet1[Type]),CALCULATE(COUNT(Sheet1[Status]),ALLSELECTED(Sheet1[Status])))
 
Eg. For the canteen, the closed should be 2 and open should be 3 in the matrix and the total should be 5. 

qwerttty_0-1686809663219.png

 

Thanks so much for the help. 

 

1 ACCEPTED SOLUTION
wdx223_Daniel
Community Champion
Community Champion

Count = SUMX(VALUES(Sheet1[Type]),CALCULATE(COUNT(Sheet1[Status]),Sheet1[Status] IN VALUES(Sheet1[Status])))

View solution in original post

1 REPLY 1
wdx223_Daniel
Community Champion
Community Champion

Count = SUMX(VALUES(Sheet1[Type]),CALCULATE(COUNT(Sheet1[Status]),Sheet1[Status] IN VALUES(Sheet1[Status])))

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.