cancel
Showing results for
Did you mean:
Regular Visitor

## Data Model Unit Calculation

Hello,

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

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):

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:

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
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
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.

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.

Highlighted
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

Announcements

#### Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

#### Community News & Announcements

Get your latest community news and announcements.

#### Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

#### Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Top Kudoed Authors
Users Online
Currently online: 275 members 3,145 guests
Recent signins: