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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

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

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

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.