cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

New Member

## Calculate column based on dynamique value (Example file attached)

Hello,

In the context of calculating carbon footprints for products, I need to calculate how often specific parts of a product need to be replaced. My difficulty lies in the fact, that I want to be able to change the lifetime of the product using a slider to analyse the impact of varying lifespans.

In my data, I have a column which an expected lifetime for each part. The lifetime of the product is devided by the lifetime of the part and subsequently rounded up to get the number each part needs to be replaced over the entire lifespan of the the product. This number of replacements can be multiplied by the carbon footprint of each part and I can then sum up the footprints of all the parts to get the product carbon footprint.

Example

Expected lifetime of a car (product) = 25 years
Expected lifetime of wheels (part) = 10 years

25/10 = 2,5 --> 3
Carbon footprint of 1 set of wheels: 100 kg CO2

3 * 100 kg = 300 kg CO2 for the wheels over the lifespan of a car.

However, I want to change the expected lifespan of my product, so I can analyse different scenarios.

I created a parameter with a slider called lifespan. My idea is, to devide the value of the slider (indicating product lifetime) by the lifetime of each part to get the number of replacements.
Unfortunately, I cannot calculate a second column by the selected value of the slider.
Do you have any idea, how I can tackle this problem? I think, I cannot use a measure to calculate this, since each line needs to be individually calculated to find the number of replacements. I think I need a calculated column which is connected to the value of the slider but this does not work. A different solution which leeds to the desired result is also appreciated.

Below an example for the data:

 Part Lifetime carbon carbon footprint per part wheels 10 100 windshield 15 50 engine 25 300

Desired output something like this but in powerBI and with the lifetime car flexible:

 Part Lifetime carbon footprint per part lifetime prod/lifetime part number of parts required carbon footprint per part wheels 10 100 2,5 3 300 windshield 15 50 1,666666667 2 100 engine 25 300 1 1 300 Total carbon footprint 700

I will attach an example Excel and PowerBI-file with the slider already included.
https://www.dropbox.com/scl/fo/nzl0lrp5cqdf9sikw87kk/AKvzuFVgOF8-52VB_Jug2eo?rlkey=n7405spmoiqkgdfjl...

Resolver III

You cannot calculate this in columns or tables since you want it to be dynamic, calculated columns are stored in the model and only update on refresh (not responsive to slicer changes).

What if parameters could be worth looking into.

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.