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! Request now

Reply
Anonymous
Not applicable

Data modelling and transformation

Hi Community,

I am bit new to power BI and juggling with an issue.

I have two excel table

Table A:

NameDatehours planned
Grey1/2/20204
Matt4/2/20206
Kevin1/5/20192
Sarah26/3/20208

 

Table B: It has similar name from table A but not all names. I made Name as my primary key

 

NameDateHours billed
Sarah26/3/20203
Grey1/2/2020

9

 

How do I manage relationships between table or build a new measure to make a visualization for planned vs billed hours, planned hours, calender quarter results etc?

 

Hoping to get a direction from you all.

 

Thanks

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous 

You may relate two tables by Name columns. If your relationship is one to one you can build a table visual and add Hours billed to do planned vs billed, it works well.

However if your relationship is many to many(there are more than one same names in Name columns, maybe they have different Date value), you may build a measure to compare Hour planned and Hour billed.

Measure:

Hours billed = CALCULATE(SUM('Table B'[Hours billed]),FILTER(ALL('Table B'),'Table B'[Date]=MAX('Table A'[Date])&&'Table B'[Name]=MAX('Table A'[Name])))

For more info to relationships and dax you may refer to blogs as below.

Create and manage relationships in Power BI Desktop

Calculated Columns and Measures in DAX

You can download the pbix file from this link: Data modelling and transformation

 

Best Regards,

Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @Anonymous 

Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file from your Onedrive for Business.

 

Best Regards,

Rico Zhou

Anonymous
Not applicable

Hi @Anonymous 

You may relate two tables by Name columns. If your relationship is one to one you can build a table visual and add Hours billed to do planned vs billed, it works well.

However if your relationship is many to many(there are more than one same names in Name columns, maybe they have different Date value), you may build a measure to compare Hour planned and Hour billed.

Measure:

Hours billed = CALCULATE(SUM('Table B'[Hours billed]),FILTER(ALL('Table B'),'Table B'[Date]=MAX('Table A'[Date])&&'Table B'[Name]=MAX('Table A'[Name])))

For more info to relationships and dax you may refer to blogs as below.

Create and manage relationships in Power BI Desktop

Calculated Columns and Measures in DAX

You can download the pbix file from this link: Data modelling and transformation

 

Best Regards,

Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

 

rubinboer
Resolver II
Resolver II

Hi there

Power BI will detect the relationship but you will have to make sure all the datatypes are correct, especially dates. once that is done review your relationship and create measures for the planned vs billed. the others will be available by default.

hope it helps regards

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.

Top Solution Authors