Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi
I am trying to create a report from the responses to a travel survey and need to be able to compare results from last year against those for this year.
Specifically I need to be able to show in one chart the changes in the amount of CO2 produced by various modes of transport from one year to the next.
I have tables for the journey data for both last year and this year with a measure that calculates the CO2 figure for the different modes of transport. The fields in both tables are the same.
At the moment the results of the calculation run through the measure are shown as two separate graphs in the report whereas it would be visually better to have them as a single graph.
How would I combine the two years worth of data to show the different CO2 emissions for each mode of transport as a single graph?
As the survey that gathers the journey data is run ever year it would be good to be able to understand how to do this so that the changes over a longer period of time can also be shown if required.
Any help with this would be most welcome.
Many thanks,
Andy
HI
Many thanks for the suggested way forwards on this.
I have two measures (CO2 2021 and CO2 2022) which run the calculation for the respective year as the survey responses are not held in a single spreadsheet but rather in two seperate spreadsheets which I have not combined into a single dataset.
From what you have suggested this would work if the responses were in a single dataset and had a year identifier associated with each response (i.e. 2021 and 2022)?
It would not be difficult to set up a Date table as this can be expanded to include each your that the survey is run.
Hi @thomsona ,
You should be able to do this using a measure with SAMEPERIODLASTYEAR https://learn.microsoft.com/en-us/dax/sameperiodlastyear-function-dax
Hi
Many thanks for pointing out that option as a possible way to solve being able to display a comparison between the two years worth of data.
From looking at this I would need to have a date associated with each response for the measure to be able to function correctly.
At present the dataset does not include this nor are the two years worth of data combined in a single dataset.
It has potential though and will continue to explore this as the way to do what I want to do.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
9 | |
8 | |
8 |
User | Count |
---|---|
14 | |
12 | |
11 | |
11 | |
8 |