Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
JoshS
Frequent Visitor

Comparing line graphs with different x-axes (dates) on the same graph

I am looking to create a single graph that compares 4 different values. The problem I am running into is each value is based off a different date column, which I am looking to combine. Currently, the data exists in 4 seperate graphs as shown below:

 

JoshS_0-1721095506593.png

 

I've created dummy data in excel to demonstrate how the data currently exists in Power BI, and the transformation I am hoping to achieve:

JoshS_1-1721095560414.png

JoshS_2-1721095605760.png

Any help in this would be greatly appreciated.  


1 ACCEPTED SOLUTION
Irwan
Super User
Super User

hello @JoshS 

 

please check if this accomodate your need.

Irwan_0-1721099991371.png

 

1. create a new date table.

Table 2 = CALENDAR(DATE(2024,6,20),DATE(2024,6,28))
I put minimum date as 20-Jun-2024 and maximum date as 28-Jun-2024.
 
2. create calculated column for average stage 1
Average Work Days in Stage 1 = AVERAGEX(FILTER('Table','Table'[Stage 1 Completion]='Table 2'[Date]),'Table'[Days in Stage 1])
 
3. create calculated column for average stage 2
Average Work Days in Stage 2 = AVERAGEX(FILTER('Table','Table'[Stage 2 Completion]='Table 2'[Date]),'Table'[Days in Stage 2])
 
4. create calculated column for average stage 3
Average Work Days in Stage 3 = AVERAGEX(FILTER('Table','Table'[Stage 3 Completion]='Table 2'[Date]),'Table'[Days in Stage 3])
 
5. create calculated column for average production
Average Work Days in Production = AVERAGEX(FILTER('Table','Table'[Stage 3 Completion]='Table 2'[Date]),'Table'[Work Days in Production])
 
so here are what i found weird in your sample data: 
1. in your desired table at stage 2, the average on 25-Jun-2024 is 2,5. However, if I looked at your power bi data, on 25-Jun-2024, the data are 3 and 1. The average should be 2.
Irwan_1-1721100332000.png

2. From what i see, the Average Work Days in Production is taking same date as Stage 3 Completion.

Irwan_2-1721100471189.png

 

Hope this will help you.

Thank you.

View solution in original post

2 REPLIES 2
JoshS
Frequent Visitor

Thanks Irwan, that was exactly what I needed.

Irwan
Super User
Super User

hello @JoshS 

 

please check if this accomodate your need.

Irwan_0-1721099991371.png

 

1. create a new date table.

Table 2 = CALENDAR(DATE(2024,6,20),DATE(2024,6,28))
I put minimum date as 20-Jun-2024 and maximum date as 28-Jun-2024.
 
2. create calculated column for average stage 1
Average Work Days in Stage 1 = AVERAGEX(FILTER('Table','Table'[Stage 1 Completion]='Table 2'[Date]),'Table'[Days in Stage 1])
 
3. create calculated column for average stage 2
Average Work Days in Stage 2 = AVERAGEX(FILTER('Table','Table'[Stage 2 Completion]='Table 2'[Date]),'Table'[Days in Stage 2])
 
4. create calculated column for average stage 3
Average Work Days in Stage 3 = AVERAGEX(FILTER('Table','Table'[Stage 3 Completion]='Table 2'[Date]),'Table'[Days in Stage 3])
 
5. create calculated column for average production
Average Work Days in Production = AVERAGEX(FILTER('Table','Table'[Stage 3 Completion]='Table 2'[Date]),'Table'[Work Days in Production])
 
so here are what i found weird in your sample data: 
1. in your desired table at stage 2, the average on 25-Jun-2024 is 2,5. However, if I looked at your power bi data, on 25-Jun-2024, the data are 3 and 1. The average should be 2.
Irwan_1-1721100332000.png

2. From what i see, the Average Work Days in Production is taking same date as Stage 3 Completion.

Irwan_2-1721100471189.png

 

Hope this will help you.

Thank you.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.