cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ChrisPBI Regular Visitor
Regular Visitor

Data Model Unit Calculation

Hello,

 

I have a data model, which might have some issues.

 

1.PNG

The Case:
A category can have several models, which come with different properties such as the release date.

A model can have several materials in gram, and a material can be used by several models.

A model has exactly four life cycle stages in which it causes emissions, in the unit kgCO2e.

 

 

 

 

This results in the following field view (unnecessary tables and columns such as the Ids are hidden):

 

3.PNG

 

 

 

 

 

 

 

 

 

 

 

What I try here is to analyze the Greenhouse Gas Emissions and amounts of materials used by Apple products.

This works well when I only use the grams for the materials and the kgCO2e for the emissions.

So it is possible to show in a matrix table, which category emits how much greenhouse gas in which life cycle stage:

 

2.PNG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

But how can I get percent values in such a table?

For example: The MacBook should have 21,29% ((2.967,20 * 100) / 13.940,00) at the stage of customer use.

This would also be helpful when I try to visualize the percentage developments of the emissions.

 

I would be very thankful for any help with this problem!

 

Thanks and Regards,

Chris

1 ACCEPTED SOLUTION

Accepted Solutions
jahida Established Member
Established Member

Re: Data Model Unit Calculation

Can you try a measure like:

 

Measure = DIVIDE(SUM('Greenhouse Gas Emissions'[kg CO2e], CALCULATE(SUM('Greenhouse Gas Emissions'[kg CO2e]), ALL('PLC Stages'[PLCStage])), 0)

 

Make sure the column in the "ALL" clause is the one on the top axis of your chart, I kind of guessed which one that was.

3 REPLIES 3
Highlighted
CahabaData New Contributor
New Contributor

Re: Data Model Unit Calculation

In the lower portion of your post you display a Report view.

 

If there is a data view (table/query) that has this same set of data - then in the Modeling tab you would add a new column and make it a calculated value.

www.CahabaData.com
jahida Established Member
Established Member

Re: Data Model Unit Calculation

Can you try a measure like:

 

Measure = DIVIDE(SUM('Greenhouse Gas Emissions'[kg CO2e], CALCULATE(SUM('Greenhouse Gas Emissions'[kg CO2e]), ALL('PLC Stages'[PLCStage])), 0)

 

Make sure the column in the "ALL" clause is the one on the top axis of your chart, I kind of guessed which one that was.

ChrisPBI Regular Visitor
Regular Visitor

Re: Data Model Unit Calculation

Hi Jahida,

 

I tried your solution and it seems to work just perfect!!

 

I just had to change to brackets, so the results is:
Measure = DIVIDE(SUM('Greenhouse Gas Emissions'[kg CO2e]); CALCULATE(SUM('Greenhouse Gas Emissions'[kg CO2e]); ALL('PLC Stages'[PLCStage])); 0)

 

Thank you very much, you are a genius!

 

Thanks and Regards,

Chris