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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Regular Visitor

## Calculate percentage of users from one table on another table

I'm very new to Power BI, and whilst I could do this easily in Excel I am struggling here. I have a table of users who have access to a system and a table of users who have been trained in the system. I would like to calculate the percentage of users for any given organisation who have access and have been trained.

Table 1 columns:

UserID

Organisation

Access active

Table 2 columns:

UserID

Organisation

Date trained

Desired result = % of Organisation {X, Y, Z} that have access and are trained

1 ACCEPTED SOLUTION
Community Support

Assume your dataset as below

Table 1

(Table2)

Create calculated columns in Table1

```trained = RELATED(Table2[user id])

access and trained =CALCULATE (    COUNT ( Table1[trained] ),    FILTER ( ALL ( Table1 ), [organization] = EARLIER ( Table1[organization] ) ))

percentage =DIVIDE (    [access and trained],    CALCULATE (        COUNT ( Table1[user id] ),        FILTER ( ALL ( Table1 ), [organization] = EARLIER ( Table1[organization] ) )    ))```

Best Regards

Maggie

1 REPLY 1
Community Support

Assume your dataset as below

Table 1

(Table2)

Create calculated columns in Table1

```trained = RELATED(Table2[user id])

access and trained =CALCULATE (    COUNT ( Table1[trained] ),    FILTER ( ALL ( Table1 ), [organization] = EARLIER ( Table1[organization] ) ))

percentage =DIVIDE (    [access and trained],    CALCULATE (        COUNT ( Table1[user id] ),        FILTER ( ALL ( Table1 ), [organization] = EARLIER ( Table1[organization] ) )    ))```

Best Regards

Maggie

## Helpful resources

Announcements

#### Join our Community Sticker Challenge

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

#### Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

#### Fabric Community Update - July 2024

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

Top Solution Authors
Top Kudoed Authors