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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
BobKoenen
Helper IV
Helper IV

Multipli values acrros 2 related tables

Hi 

 

I have a large trfact table with the hours per employee per date. I also have an employee table which is linked to this tabel which contains the Hourly rate. I want to Calculate the [sum of hours] * [hourly rate] without having to add an extra column to my large fact table.

Hours table

DateEmployee idHours
1-1-202112
1-1-202113
1-1-202125
2-1-202123

 

My employee table looks like this

Idrate
110
215

 

I Want to multiply the hourly rate times the sum of the hours to get the total amount. 

hope you can help me

1 ACCEPTED SOLUTION
HashamNiaz
Solution Sage
Solution Sage

Hi @BobKoenen !

You need to have following 2 measure;

 

 

Total Hours = SUM(Hours[Hours])

Total Amount = SUMX(RELATEDTABLE(Employee), [Rate] * [Total Hours])

 

Your Employee & Hours table needs to be connected through Active relationship based on EmployeeID column.

 

The first measure calculates [Total Hours], second measure calculates [Total Amount], You can plot this against EmployeeID or any other attribute.

 

Regards,

Hasham

View solution in original post

1 REPLY 1
HashamNiaz
Solution Sage
Solution Sage

Hi @BobKoenen !

You need to have following 2 measure;

 

 

Total Hours = SUM(Hours[Hours])

Total Amount = SUMX(RELATEDTABLE(Employee), [Rate] * [Total Hours])

 

Your Employee & Hours table needs to be connected through Active relationship based on EmployeeID column.

 

The first measure calculates [Total Hours], second measure calculates [Total Amount], You can plot this against EmployeeID or any other attribute.

 

Regards,

Hasham

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors