Forum Discussion

Voose's avatar
Voose
Icon for Helper III rankHelper III
9 years ago
Solved

Bring one total column from a table into another

Hi Guys,

 

Feel like I have a basic question here but just unsure how I can get this done in my head. In one table i have my target utilisation by region and by Month:

 

Target UtilisationRegionAttribute
74.75AmericasMar
65AmericasApr
74.75AmericasMay
71.5AmericasJun
68.25AmericasJul
74.75AmericasAug
68.25AmericasSep
71.5AmericasOct
71.5AmericasNov
68.25AmericasDec
74.75AmericasJan
65AmericasFeb
71.5AmericasMar2
71.5APACMar
65APACApr
74.75APACMay
65APACJun
74.75APACJul
71.5APACAug
68.25APACSep
74.75APACOct
68.25APACNov
71.5APACDec
71.5APACJan
68.25APACFeb
74.75APACJan2
132.25EMEAMar
115EMEAApr
132.25EMEAMay
126.5EMEAJun
120.75EMEAJul
132.25EMEAAug
120.75EMEASep
126.5EMEAOct
126.5EMEANov
120.75EMEADec
132.25EMEAJan
115EMEAFeb
126.5EMEAMar2

 

 

In another table i have my actual data by month and region as well:

AttributeRegionDays WorkedTotal Utilisation
TotalAPAC395 
TotalEMEA499 
TotalAmericas109 
MarAPAC80 
MarEMEA97 
MarAmericas5 
AprAPAC81 
AprEMEA90 
AprAmericas38 
MayAPAC55 
MayEMEA80 
MayAmericas35 
JunAPAC18 
JunEMEA70 
JunAmericas23 
JulAPAC10 
JulEMEA42 
JulAmericas4 
AugAPAC30 
AugEMEA32 
AugAmericas2 
SepAPAC30 
SepEMEA32 
SepAmericas2 
OctAPAC30 
OctEMEA26 
OctAmericas2 
NovAPAC30 
NovEMEA35 
NovAmericas2 
DecAPAC30 
DecEMEA26 
DecAmericas2

 

 

 

I want to basically do a % of my actual vs a % of what is in my target column (the first table).

 

 

Let me know any thoughts or any easier ways of doing this I was planning on trying to pull the target column into the second tables then just creating a calculated column to bring in the value... having a bit of a mind fart let me know what you guys think.

 

Thanks

 

Voose

  • Hi Voose,

     

    Try to make a ID column in each of the table composed by region and month, them do a relation between the two table with that ID and you can the make a Column or use the values from the two table directly.

     

    the Column will look something like this 

    Column = CALCULATE(SUM(Target[Target Utilisation]);RELATEDTABLE(Target))

    Regards

     

    MFelix 

12 Replies

  • Hi Voose,

     

    Try to make a ID column in each of the table composed by region and month, them do a relation between the two table with that ID and you can the make a Column or use the values from the two table directly.

     

    the Column will look something like this 

    Column = CALCULATE(SUM(Target[Target Utilisation]);RELATEDTABLE(Target))

    Regards

     

    MFelix 

    • Voose's avatar
      Voose
      Icon for Helper III rankHelper III

      Hi MFelix,

       

      Thanks for the quick response, i've created the ID as suggested:

      AttributeRegionDays WorkedID CreationTarget Utilisation
      TotalAPAC395TotalAPAC#ERROR
      TotalEMEA499TotalEMEA#ERROR
      TotalAmericas109TotalAmericas#ERROR
      MarAPAC80MarAPAC#ERROR
      MarEMEA97MarEMEA#ERROR
      MarAmericas5MarAmericas#ERROR
      AprAPAC81AprAPAC#ERROR
      AprEMEA90AprEMEA#ERROR
      AprAmericas38AprAmericas#ERROR
      MayAPAC55MayAPAC#ERROR
      MayEMEA80MayEMEA#ERROR
      MayAmericas35MayAmericas#ERROR
      JunAPAC18JunAPAC#ERROR
      JunEMEA70JunEMEA#ERROR
      JunAmericas23JunAmericas#ERROR
      JulAPAC10JulAPAC#ERROR
      JulEMEA42JulEMEA#ERROR
      JulAmericas4JulAmericas#ERROR
      AugAPAC30AugAPAC#ERROR
      AugEMEA32AugEMEA#ERROR
      AugAmericas2AugAmericas#ERROR
      SepAPAC30SepAPAC#ERROR
      SepEMEA32SepEMEA#ERROR
      SepAmericas2SepAmericas#ERROR
      OctAPAC30OctAPAC#ERROR
      OctEMEA26OctEMEA#ERROR
      OctAmericas2OctAmericas#ERROR
      NovAPAC30NovAPAC#ERROR
      NovEMEA35NovEMEA#ERROR
      NovAmericas2NovAmericas#ERROR
      DecAPAC30DecAPAC#ERROR
      DecEMEA26DecEMEA#ERROR
      DecAmericas2DecAmericas

      #ERROR

       

      The above is the current output and the formula within the last column is as follows -> Target Utilisation = calculate(sum('Summarised Tables Month Ultilisation'[Target Utilisation]),RELATED('Summarised Tables Month Ultilisation'[Target Utilisation]))

       

      Unsure why I'm not getting a value back.

       

      Let me know!

      • MFelix's avatar
        MFelix
        Icon for Super User rankSuper User

        Hi Voose,

         

        In the related you can only refer to the table not a colum so you formula should be:

         

        Target Utilisation = calculate(sum('Summarised Tables Month Ultilisation'[Target Utilisation]),RELATED('Summarised Tables Month Ultilisation))

        You are already refering to the column you want in the sum function.

         

        MFelix