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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Eyad_Rish
New Member

Plotting line plot using two datasets with different x-axis intervals

Long story short, I have two datasets, dataset A and dataset B

 

Dataset A and B both have "distance" from origin and "speed" as coloumns

 

Dataset A is the permentant speed requirements while Dataset B gets refreshed in daily.

 

Datasset A has even values (2, 4, 6 ... etc) for distance while Dataset B has odd values (1, 3, 5, etc)

 

Essentially, trying to create a line plot using the two datasets so that X-axis is "distance" and Y-axis is "Speed". Problem is, when I try to plot them, it doesn't see shared x-axis values and gives me average speed as one constant value from Dataset B. 

 

Looking to plot both datasets on the same plot.

 

1 ACCEPTED SOLUTION
v-yangliu-msft
Community Support
Community Support

Hi  @Eyad_Rish ,

 

Whether your two data sets can not connect the relationship between the columns, such as [distance], A table [distance] is an even value, B table is an odd value, there is not a relationship between them can connect the columns, the two columns together in the line chart, there will be "Can't display the data because Power BI can't determine the relationship between two or more fields", if you just put A table [distance], will only display the table in the [Speed]. data because Power BI can't determine the relationship between two or more fields", if you just put the [distance] in table A, it will only display the [Speed] in this table, and will not display the [Speed] in table B. If you just put [distance] from table A, it will only show [Speed] from this table and not [Speed] from table B, because there is no corresponding value.

 

You can consider creating a table to join the two tables:

Table =
UNION(
    'TableA','TableB')

vyangliumsft_0-1691721327260.png

Result:

vyangliumsft_1-1691721327265.png

 

 

Best Regards,

Liu Yang

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

View solution in original post

2 REPLIES 2
v-yangliu-msft
Community Support
Community Support

Hi  @Eyad_Rish ,

 

Whether your two data sets can not connect the relationship between the columns, such as [distance], A table [distance] is an even value, B table is an odd value, there is not a relationship between them can connect the columns, the two columns together in the line chart, there will be "Can't display the data because Power BI can't determine the relationship between two or more fields", if you just put A table [distance], will only display the table in the [Speed]. data because Power BI can't determine the relationship between two or more fields", if you just put the [distance] in table A, it will only display the [Speed] in this table, and will not display the [Speed] in table B. If you just put [distance] from table A, it will only show [Speed] from this table and not [Speed] from table B, because there is no corresponding value.

 

You can consider creating a table to join the two tables:

Table =
UNION(
    'TableA','TableB')

vyangliumsft_0-1691721327260.png

Result:

vyangliumsft_1-1691721327265.png

 

 

Best Regards,

Liu Yang

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

amitchandak
Super User
Super User

@Eyad_Rish , Not very clear, seems like you need a table of values using generateseries and join it with both the tables

 

The information you have provided is not making the problem clear to me. Can you please explain with an example.

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Appreciate your Kudos.

 

refer

Power BI- DAX: When I asked you to create common tables: https://youtu.be/a2CrqCA9geM
https://medium.com/@amitchandak/power-bi-when-i-asked-you-to-create-common-tables-a-quick-dax-soluti...

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.