Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I am trying to make a line chart of averages from the past 5 years, something like this:
Each point represents an average of all the datapoints for that year. However, I only have datapoints for the past two years (2023 and 2022). But I have historical information on what the values are for the previous years, from 2018 to 2021. So it's a separate table with static values. How do I create a line chart with a single line connecting all the averages from 2018 to 2023?
Solved! Go to Solution.
You can (and should) utilize a 'Date Table' for this.
The two tables are connected through the common date table.
The x axis of your chart is this date table.
Here is an article on creating and using a date table:
https://learn.microsoft.com/en-us/power-bi/guidance/model-date-tables
Once this is setup and connected, you can use a measure to combine both values into a single line.
Here are the results:
Here is the measure to combine them into one line:
Here is the data model (using the 'Date Table' as the common connection:
Here is a sample of the Date Table (done in excel):
Here is the sample data (one data point for historical, and multiple for data points for 2022-2023):
Let me know if this works for you.
You can (and should) utilize a 'Date Table' for this.
The two tables are connected through the common date table.
The x axis of your chart is this date table.
Here is an article on creating and using a date table:
https://learn.microsoft.com/en-us/power-bi/guidance/model-date-tables
Once this is setup and connected, you can use a measure to combine both values into a single line.
Here are the results:
Here is the measure to combine them into one line:
Here is the data model (using the 'Date Table' as the common connection:
Here is a sample of the Date Table (done in excel):
Here is the sample data (one data point for historical, and multiple for data points for 2022-2023):
Let me know if this works for you.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
97 | |
65 | |
45 | |
39 | |
31 |
User | Count |
---|---|
164 | |
111 | |
61 | |
53 | |
38 |