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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
andy808
Helper III
Helper III

Countrows, DistinctCount or Sum with a Filter to get a COUNT

I have 2 tables: [Projects] and [Issues], relationship is 1 [Project] to many [Issues] by Project ID

I thought this would be straight forward but I am unable to find the DAX formula to give the correct results.

Currently I have the table to the left and I need results on the right to produce COUNTS for a card visual stating there are 3 Open issues that involve 2 Projects: 

 

andy808_3-1699902773245.png  -->>  andy808_7-1699903694803.png

 

 

 

 

 

 

2 REPLIES 2
chonchar
Helper V
Helper V

No. of Projects =
Distinctcount(TableName[Project Name]
)

No. of Issues =
distinctcount(TableName[Issueid]
)

Then add those measures into the cards. 

 

Good luck, 

Cam

Thannk you for your reply, however using any of these measures in a CARD - doesn't take into consideration the Closed or Open filter.

 

I use the measurebelow in a table visual and I get the correct answer of 8, but the card does not allow me to use this filter

 

CountIssuesNotClosed =
IF([IssueCount] > 0 && CALCULATE(COUNTROWS('Issues'), KEEPFILTERS(Issues[Status] <> "(3) Closed"
      )),
   1, 0
  )
 
My table results with the measure on the bottom table
andy808_1-1700496424855.png

So I have formatted the 8 in the table to get a card looking visual but was hoping for a better solution

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.