Forum Discussion

mbrawn's avatar
mbrawn
Frequent Visitor
8 years ago
Solved

Cross-Table Calculation

Hi there,

 

I am after some help with an issue I have performing a simple calculation across 2 tables. I have the following relationship set up between these 2 tables:

 

 

This is allowing me to do everything I need to except one thing. I need a column created in the PowerBI_Cache_Projects table which is the SUM of (PowerBI_Cache_Timelogs(2)[HOURSSPENT]) * 105.

 

I have tried using the RELATED function as this seems to come up a lot in these posts, but that only works from the Timelogs table to Projects, not the other way around. Intellisense does not pick up the Timelogs table when querying from Projects.

 

Anyone any ideas?

 

Thanks

  • mbrawn

     

    Hi, are you already try with:

     

    New calculated column:

     

    TotalHoursSpent = CALCULATE(sum(Table2[HourSpent]))*105

     

    Regards

     

    Victor

    Lima - Peru

     

     

3 Replies

  • Vvelarde's avatar
    Vvelarde
    Community Champion

    mbrawn

     

    Hi, are you already try with:

     

    New calculated column:

     

    TotalHoursSpent = CALCULATE(sum(Table2[HourSpent]))*105

     

    Regards

     

    Victor

    Lima - Peru

     

     

    • mbrawn's avatar
      mbrawn
      Frequent Visitor

      Vvelarde

       

      You hero! Thank you, that has given me exactly what I need.

       

      Thank you.