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
rpiboy_1
Helper V
Helper V

Measure - Intersecting counts of two dimensions

I have the following data model:

 

fact MonthlyUserActivity - each row represents the quantity of logins by a single user into a single project for each month

dim RegionalUsers - bridge table to consolidate user IDs

dim Users - list of all users

dim Projects - list of all projects

dim Databases - list of databases each project belongs to a single database

dim Owners - each database belongs to one owner

Relationships:
fact MonthlyUserActivity (*->1) RegionalUsers (*->1) Users

fact MonthlyUserActivity (*->1) Projects (*->1) Databases (*->1) Owners

 

What I'm trying to acheive is a Measure that:

  • Calculates the quantity of Owners each User has interacted with by way of the Projects they access. I can represent this value in a Table or Matrix with this measure: COUNTROWS(SUMMARIZE('MonthlyUserActivity', 'Owners'[Owner Name]))
  • Filters the resulting table to only rows where the COUNT is greater than 1
  • Count the resulting rows to return the total number of users that have accessed data from multiple Owners.

I've tried a few things, but not having much luck in building a virtual table that returns the correct data. Suggestions are welcome!

1 ACCEPTED SOLUTION
rpiboy_1
Helper V
Helper V

Solved my own problem....

    FILTER(
        SUMMARIZECOLUMNS(
            'User List'[id],
            "CountOwners", COUNTROWS(SUMMARIZE('Monthly User Activity by Project', 'Owners'[Owner Name]))
        ),
        [CountOwners] > 1
    )
 

View solution in original post

5 REPLIES 5
Nasif_Azam
Super User
Super User

Hey @rpiboy_1 ,

 

Thanks for the detailed explanation of your data model. You're on the right track you need a measure that:

  1. Builds a virtual table showing each User and how many distinct Owners they have interacted with.
  2. Filters that table to only include users with Owner count > 1.
  3. Counts the number of such users.

 

Users with Multiple Owners (Measure)

UsersWithMultipleOwners :=
VAR UsersOwners =
ADDCOLUMNS (
VALUES ( 'Users'[UserID] ),
"OwnerCount",
CALCULATE (
DISTINCTCOUNT ( 'Owners'[Owner Name] )
)
)
VAR FilteredUsers =
FILTER ( UsersOwners, [OwnerCount] > 1 )
RETURN
COUNTROWS ( FilteredUsers )

 

If you found this solution helpful, please consider accepting it and giving it a kudos (Like) it’s greatly appreciated and helps others find the solution more easily.


Best Regards,
Nasif Azam



Did I answer your question?
If so, mark my post as a solution!
Also consider helping someone else in the forums!

Proud to be a Super User!


LinkedIn

Hi @rpiboy_1 ,

I would also take a moment to thank @SamsonTruong , for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.
 

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If the response has addressed your query, please Accept it as a solution so that other community members can find it easily.

 

Thank you

Harshitha.

Community Support Team.

rpiboy_1
Helper V
Helper V

Solved my own problem....

    FILTER(
        SUMMARIZECOLUMNS(
            'User List'[id],
            "CountOwners", COUNTROWS(SUMMARIZE('Monthly User Activity by Project', 'Owners'[Owner Name]))
        ),
        [CountOwners] > 1
    )
 

@rpiboy_1 Awesome, great catch on the adjustment!

SamsonTruong
Super User
Super User

Hi @rpiboy_1 ,

Can you try the following measure and let me know if this achieves your desired result?:

Measure = 
VAR UsersWithOwnerCounts =
    ADDCOLUMNS(
        VALUES('Users'[User ID]),
        "OwnerCount",
        CALCULATE(
            DISTINCTCOUNT('Owners'[Owner Name])
        )
    )

VAR FilteredUsers =
    FILTER(UsersWithOwnerCounts, [OwnerCount] > 1)

RETURN
COUNTROWS(FilteredUsers)

 

If this helped, please mark it as the solution so others can benefit too. And if you found it useful, kudos are always appreciated.

Thanks,

Samson

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.