Forum Discussion
Calculate CO2 in Excel and PowerBI
- Jun 10, 2021
Hi there,
So I took a stab at it and looked like you were doing a lot of manual things to get the calculations going. First thing I did is change up the formulas in column E,I, L, & P. I put in an index/match formula that will crawl through the "Factors" sheet to find the respective CO2 emissions (factors 1 & 2). With different data entries, you'll need to update these values for the fields in the raw data to compute properly. Secondly, because there are mulitple methods of transportation that vary from 1 - 4 selections, I added in a column (R) to find the main method of transportation (I used the max time of commute among the values in the row). Column R will spit back the main method of transportation. And lastly (regarding the column changes), added in 1s for column T to count the unique survey participants.
I formatted everything as a table, so the pivot will reference the table instead of a range (this will help you avoid having to update the pivot range each time an entry is made).
If you enter in new data, just click the refresh button on the data tab.
I would recommend that you finalize the survey and export in the rawest form and then build formulas around on new columns on the right. That will make it much easier if you anticipate thousands of incoming surveys.
The pivot chart will show the total CO2 emission by individuals (using their primary form of transportation) along with the count of survey takers. You could also show averages, but in this case, I think sheer volume might be the way to go. Secondary axis will show the count of unique survey takers.
Try keying in data and then hitting refresh to make sure things don't break. The "Factors" sheet will be your source of truth so anything missing will throw off the calculations (i.e., adding in a new type of transportation without updating the "factors" sheet will break the formulas)
Hopefully this helps, let me know if you have any questions.
Hi
Thanks for the reply.
What I would like to be able to show is the amount of CO2 produced by each mode of transport that produces this.
So for instance if it is possible to do so car should show the amount of CO2 as a combination of Drive a car alone, Car share as driver and Car share as passenger.
As this is for reporting survey outcomes a simple bar chart would suffice.
I have attached the spreadsheet that I have been working with.
Thanks for sending! Would you also have the raw output of the survey results? I'd like to automate this for you so you can just paste the data and things will calculate automatically.
- thomsona1969Jun 10, 2021Copper Contributor
I hadn't got as far as anything to output the results in other than with a Pivot table and chart as in the attached. I had moved on to using PowerBI for this but need to have the ability to do this in Excel as a fall back especially if someone else takes on this work
- CheugyJun 10, 2021Copper Contributor
Hi there,
So I took a stab at it and looked like you were doing a lot of manual things to get the calculations going. First thing I did is change up the formulas in column E,I, L, & P. I put in an index/match formula that will crawl through the "Factors" sheet to find the respective CO2 emissions (factors 1 & 2). With different data entries, you'll need to update these values for the fields in the raw data to compute properly. Secondly, because there are mulitple methods of transportation that vary from 1 - 4 selections, I added in a column (R) to find the main method of transportation (I used the max time of commute among the values in the row). Column R will spit back the main method of transportation. And lastly (regarding the column changes), added in 1s for column T to count the unique survey participants.
I formatted everything as a table, so the pivot will reference the table instead of a range (this will help you avoid having to update the pivot range each time an entry is made).
If you enter in new data, just click the refresh button on the data tab.
I would recommend that you finalize the survey and export in the rawest form and then build formulas around on new columns on the right. That will make it much easier if you anticipate thousands of incoming surveys.
The pivot chart will show the total CO2 emission by individuals (using their primary form of transportation) along with the count of survey takers. You could also show averages, but in this case, I think sheer volume might be the way to go. Secondary axis will show the count of unique survey takers.
Try keying in data and then hitting refresh to make sure things don't break. The "Factors" sheet will be your source of truth so anything missing will throw off the calculations (i.e., adding in a new type of transportation without updating the "factors" sheet will break the formulas)
Hopefully this helps, let me know if you have any questions.
- thomsona1969Jun 11, 2021Copper ContributorHi
Thanks for having a look at this and for coming up with a solution.
I will test it out and if there is anything that I am unsure of I will let you know.
Many thanks for the help,
Andy