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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
pipechaves
Frequent Visitor

Need Help- Relationships and formulas

Hi members,

 

I need some advice. As today I got a really strange issues from a fellow.


He got 3 tables.


One contains the Project Name, Total Hours and other fields. I will just mention the important ones.
Another one is the Rate and PMO Location
and the last one will be the Project: Which contains PMO Location, Project Name and others.

 

What he is trying and I couldnt succed was to create a new column ON PROJECT that its formula will be Rate*Hours


Rate is on the Rate table and Hours in the Time table.


I wasnt able to do so.


Any help will be appreciated.

 

Table data below

 

Table: Time

Hours# of PMOResourcesPeriodProject
3005September 2017Apollo
421October 2017Apollo
31November 2017Apollo
281December 2017Apollo
331January 2018Apollo
913February 2018Apollo
683March 2018Apollo
642April 2018Apollo
221May 2018Apollo
723January 2018Aries
542February 2018Aries
632March 2018Aries
612April 2018Aries
381May 2018Aries
532February 2018Gemini
291March 2018Gemini
151April 2018Gemini
1004May 2018Gemini
2003August 2017Leo
501September 2017Leo
832October 2017Leo
191November 2017Leo
572December 2017Leo
851August 2017Orion
751September 2017Orion
191April 2018Pegasus
603May 2018Pegasus
482May 2018Taurus
1002June 2017Titan


Table: Rate

PMO LocationRate
APAC80
EMEA90
LATAM100
NA110


Table: Project

Project NameProject ManagerProject Start DateProject Finish DatePMO Location
ApolloBob9/13/2017 APAC
AriesBob1/4/2018 EMEA
GeminiTim2/18/2018 EMEA
LeoSally8/28/201712/30/2017LATAM
OrionTina8/15/20179/30/2017LATAM
PegasusSally4/4/2018 NA
TaurusAngie5/1/2018 NA
TitanTina6/1/20176/30/2017APAC


It seems the relationships created where good and so on. Any help/explanation will be of great help.

Thank you all

1 ACCEPTED SOLUTION
Vvelarde
Community Champion
Community Champion

@pipechaves

 

Hi, Friend, try with this calculated column

 

Rate*Hours =
CALCULATE ( SUM ( 'Time'[Hours] )
    * RELATED ( Rate[Rate] )



Lima - Peru

View solution in original post

3 REPLIES 3
Vvelarde
Community Champion
Community Champion

@pipechaves

 

Hi, Friend, try with this calculated column

 

Rate*Hours =
CALCULATE ( SUM ( 'Time'[Hours] )
    * RELATED ( Rate[Rate] )



Lima - Peru

it seems that might work.

 

Do you mind explaining why the use of related and so on insted of doing it directly ?

 

Thank you

@pipechaves

 

The RELATED function returns to you a value from another related table.

 

So in this case you want the Rate from RateTable (From One to Many) and the function search (or Look) the Row with the coincidence according to the Key of the relationship (PMO Location)




Lima - Peru

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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