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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Jason_Anderson
New Member

Solution to COUNTA Function?

Hello all, I am very new to Power BI and I'm running into an issue I could use some help with. I assume I need to use CALCULATE / COUNTA for this? This is what I am trying to do:

 

I have two tables and one column in each of those tables I need to compare. Table / Column 1 is QA [ID] and Table / Column 2 is BAT Testing[QA ID]. And the QA IDs are the same in each table. Each QA ID will appear once in the QA Table and many times in the BAT Table.  

 

Basically, what I need to do is come up with calculate function that will total up the number of times an individual QA ID displays in the BAT table. 

 

Edit: I should mention in case it matters, the column for QA ID in the BAT table is a "list" generated based on the ID's in the QA table. The selection isn't freeform. 

4 REPLIES 4
Anonymous
Not applicable

By your descrition it sounds like you could link these tables in the Table relationships section of Power BI.

Next you could create a matrix visual, which you can place the QA [ID] as the Row.
Lastly you could place BAT Testing[QA ID] into the values column and select "Count" as the metric.

 

Power BI will provide the results.

If you need this value as part of a larger measure, because you need the result.  The measure mentioned by @Mi2n will always be context sensitive, so if you are doing something on an ID basis, this should only count the related rows because of the table relationship.

Mi2n
Microsoft Employee
Microsoft Employee

count = COUNTA('BAT Testing'[QA ID])

 

This should work.

Thank you for the response. Unfortunately, this does not work. What this does is return the total number of IDs in the column, not the number of matching indicates. 

How about creating a table with one column as QA[ID] and the other column as the calculated measure? Will it not give what you want?

 

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 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.

Top Solution Authors
Top Kudoed Authors