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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
CZGruezimek
Frequent Visitor

Multiple X-axis/Time Data in Line Chart/LineDot Chart

Hello everyone, I have the following challenge in Power BI:
I would like to display the following table data in a chart so that I can compare them. “Date 1” and the associated “Price 1” should be displayed as a line, “Date 2” and the associated “Price 2” as data points.

Data example:

Date 1Price 1Date 2Price 2
01.01.2017     525.422,26     13.12.2017     530.000,00    
01.02.2017525.422,26 23.11.2020600.000,00 
01.03.2017525.422,26 25.11.2020600.000,00 
01.02.2018539.155,47 21.08.2023665.800,00 
01.03.2018539.155,47 08.08.2023663.700,00 
01.04.2017546.276,39 08.08.2023668.900,00 
01.05.2018546.276,39 08.08.2023663.700,00 
01.06.2018546.276,39 30.08.2022680.000,00 
01.07.2018546.276,39 01.10.2022680.000,00 
01.08.2018546.276,39 23.08.2022680.000,00 
01.09.2018546.276,39   
01.10.2018546.276,39   
01.11.2018546.276,39   
01.12.2018546.276,39   
01.01.2019556.449,14  

 

I achieved the final aspect in Power BI by reducing the line width in a line chart and using data markers.
But now I have the problem that Price 1 and 2 each have different associated time data... conversely, I have two X-axes. 

Excel chart example:
CZGruezimek_0-1704268478673.png

As can be seen in the Excel diagram shown, this representation is possible in Excel, but so far I have not found a way to integrate "Date 2" in Power BI and display it correctly. I would be very happy about a tip. Thanks.

1 ACCEPTED SOLUTION
Ritaf1983
Super User
Super User

Hi @CZGruezimek 
You can use a date table with an active relationship to date 1 and inactive to date 2,
And use a function use relationship for calculating price 2.

Ritaf1983_0-1704436195234.pngRitaf1983_1-1704436224791.png

Pbix with example is attached

More information about handling multiple dates on the link:
https://www.youtube.com/watch?v=fOcgIuaJHEs&t=39s

 

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

6 REPLIES 6
Ritaf1983
Super User
Super User

Hi @CZGruezimek 
You can use a date table with an active relationship to date 1 and inactive to date 2,
And use a function use relationship for calculating price 2.

Ritaf1983_0-1704436195234.pngRitaf1983_1-1704436224791.png

Pbix with example is attached

More information about handling multiple dates on the link:
https://www.youtube.com/watch?v=fOcgIuaJHEs&t=39s

 

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Hi @Ritaf1983  
Thanks for your reply! Unfortunately it doesn't work yet.
I would be happy if you could help me again.
Here's what I've done so far:

 

Here is my formatted data base again:
CZGruezimek_2-1704629195428.png

 

As shown in this video, (https://www.youtube.com/watch?v=5i41-FiscYI) I disabled the Auto Date Time. I then created a Date Table using Power Query. As you showed, I then created the links between "Table" and "calender", as well as the measure "price 2_".
CZGruezimek_4-1704630179209.png

CZGruezimek_3-1704629988851.png

 

Then I dragged the measure into the Y-axis (as shown in this video https://www.youtube.com/watch?v=fOcgIuaJHEs&t=39s). Unfortunately, the following illustration emerged:

CZGruezimek_1-1704628396637.png

 

Thanks!

 

Hi @CZGruezimek 
please share a link to pbix I'll try to help

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Hi @CZGruezimek 
1. I added missing dates to the date table that you created. 

2. You need to use a date from the date table as a graph axis.

3. the last price_1 is in December 2019 so its line ends there...

Ritaf1983_0-1704679636749.png

The updated pbix is attached

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

@Ritaf1983Thank you very much for your help! That's how I wanted it 🙂

Happy to help, you were on the right way 🙂

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.

Top Solution Authors