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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Voose
Helper III
Helper III

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

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

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 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

12 REPLIES 12
MFelix
Super User
Super User

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 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



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!

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


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Hi @MFelix,

 

Nailed it, we needed the relatedtable function 🙂 

 

Thanks for your help buddy!!

 

Voose

Hi @MFelix,

 

Trying to finish this off to create a % total on the end see below:

 

AttributeRegionDays WorkedID CreationTotal Working days by month and Region% of target achieved
TotalAPAC395TotalAPAC0 
TotalEMEA499TotalEMEA0 
TotalAmericas109TotalAmericas0 
MarAPAC80MarAPAC71.5 
MarEMEA97MarEMEA132.25 
MarAmericas5MarAmericas74.75 
AprAPAC81AprAPAC65 
AprEMEA90AprEMEA115 
AprAmericas38AprAmericas65 
MayAPAC55MayAPAC74.75 
MayEMEA80MayEMEA132.25 
MayAmericas35MayAmericas74.75 
JunAPAC18JunAPAC65 
JunEMEA70JunEMEA126.5 
JunAmericas23JunAmericas71.5 
JulAPAC10JulAPAC74.75 
JulEMEA42JulEMEA120.75 
JulAmericas4JulAmericas68.25 
AugAPAC30AugAPAC71.5 
AugEMEA32AugEMEA132.25 
AugAmericas2AugAmericas74.75 
SepAPAC30SepAPAC68.25 
SepEMEA32SepEMEA120.75 
SepAmericas2SepAmericas68.25 
OctAPAC30OctAPAC74.75 
OctEMEA26OctEMEA126.5 
OctAmericas2OctAmericas71.5 
NovAPAC30NovAPAC68.25 
NovEMEA35NovEMEA126.5 
NovAmericas2NovAmericas71.5 
DecAPAC30DecAPAC71.5 
DecEMEA26DecEMEA120.75 
DecAmericas2DecAmericas68.25 

 

This is the formula im using -> % of target achieved = 'Summarised Actuals by Month'[Total Working days by month and Region]/'Summarised Actuals by Month'[Days Worked]

 

However I'm getting a circular dependancy error.... unsure why?

Hi @Voose,

 

Keep it simple if you add the colum you need in your visual and chosse quick calc the Power BI will allow you to add the % over grand total,

 

Regards Mfelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Capture.PNGThis is what my visual looks like currently, if I try and add a quick calc to the green line and calculate as % of grand total it gives me this :

 

Capture2.PNG

 

Or if I do it the other way around I get a flat line also - the green line should be a % of the black line

 

Thanks for your patience 🙂

 

Voose

The two line aren't in the same format since one is % and the other total numbers you need to have ine in coluns and the other in line choose the bar and line chart and it will work

Regards

Mfelix

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Hi @MFelix,

 

Just nailed it with a line graph but using a measure that divides one against the other 🙂 thank you for your help! and appretiate your patience.

 

Thanks

 

Voose

Hi @MFelix,

 

So I want Days worked to be a % of Total working days by month for exmaple in this picture you can see that April is about 80% and in June its around 40%, I could like to see that on a single line graph,

 

capture3.PNG

 

Does that make sense? I shouldn't have 2 values on the graph, just 1 and that 1 value should be the % of these two against each other

 

Thanks

 

Voose

@Voose,

Makes sense but that is different make a column that divides total days worked by total working days then format as % and use it in your chart.

Mfelix

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Hi @MFelix,

 

Am now using  -> Target Utilisation = calculate(sum('Summarised Tables Month Ultilisation'[Target Utilisation]),RELATED('Summarised Tables Month Ultilisation'))

 

Still having the same error message... unsure why, i have a bi-directional 1-1 relationship in the model as well.

 

Thanks 

 

Voose

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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