Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello,
I am looking to create a measure to perfrom the following:
The two tables below are linked by "User Name".
User Name | Project Name | Hours |
Tim | Project 1 | 4 |
Tim | Project 2 | 10 |
Paul | Project 3 | 2 |
Paul | Project 4 | 8 |
Paul | Project 5 | 10 |
User Name | Available Hours |
Tim | 32 |
Paul | 40 |
I need to have a display that calculates as such:
User Name | Used Hours | Remaining Available Hours |
Tim | 14 | 18 |
Paul | 20 | 20 |
Essentially the sum of each persons used hours subtracted from thier available total listed in the other table. Thanks.
Solved! Go to Solution.
Hi @KLGRIZZARD
Used Hours = SUM ( Table1[Hours] )
Remaining Available Hours =
IF (
HASONEVALUE ( Table2[Available Hours] ),
VALUES ( Table2[Available Hours] ) - [Used Hours]
)
Then use a matrix visual - Table1or2[User Name] column at the rows and [Remaining Available Hours] measure at the values
Hi @KLGRIZZARD
Used Hours = SUM ( Table1[Hours] )
Remaining Available Hours =
IF (
HASONEVALUE ( Table2[Available Hours] ),
VALUES ( Table2[Available Hours] ) - [Used Hours]
)
Then use a matrix visual - Table1or2[User Name] column at the rows and [Remaining Available Hours] measure at the values
Hi @KLGRIZZARD ,
Create two measure like below:-
Used Hours = sum(user name[hours])
Remaining Available Hours = sum(table[available hours]) - sum(user name[hours])
Thanks,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Thanks, the first measure I can get to work, the second, not so much.
For example sake the tables are named "Project Hours" and "Available Hours" I am not sure how that relates to the second measure.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
11 | |
9 | |
8 | |
6 | |
5 |
User | Count |
---|---|
19 | |
17 | |
11 | |
9 | |
9 |