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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Count measure in Matrix

Hello everyone,

Thanks in advance for your time and help.

 

Here is a sample of my table :

bug1.PNG

 

I am trying to create a Matrix that counts the number of transactions per responsable & per status of transaction. 

My Matrix should look like that : 

bug2.PNG

In the Matrix above, the names displayed in lines is taken from another table that just list the names in a column named "Responsable names"

 

I am looking for the right formula for my measure to count the transactions. I have tried many things.... It never fits.

ps : When there are 2 responsables for one transaction, it should be counted as 1 for responsable 1 and 1 for responsable 2.

 

If anyone has a clue, I would be very grateful.

 

Thanks a lot

2 REPLIES 2
DataInsights
Super User
Super User

@Anonymous, try this measure. You'll need to create two relationships as shown below.

 

Transaction Count = 
VAR vPerson1 =
    COUNT ( 'Transaction'[Transaction ID] )
VAR vPerson2 =
    CALCULATE (
        COUNT ( 'Transaction'[Transaction ID] ),
        USERELATIONSHIP ( Person[Name], 'Transaction'[Responsible for transaction 2/2] )
    )
VAR vResult = vPerson1 + vPerson2
RETURN
    vResult

 

Sample data:

 

DataInsights_3-1602003494268.png

 

Active relationship:

 

DataInsights_1-1602003454753.png

 

Inactive relationship:

 

DataInsights_2-1602003465068.png

 

Use Person[Name] in the matrix rows. The Person table is a list of all names.

 

Result:

 

DataInsights_0-1602003428891.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

Why have you not given us a small but fully functional example? Your matrix is empty, so we can't see any numbers. Please refer to this article to know what's the best way to post questions and maximize the chance of getting a good answer:
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

Users online (4,864)