Forum Discussion
Line Chart Y-Axis Only Showing Aggregate Options. No Raw Value To Plot
I am new to Power BI, but i've spent hours trying to get the most basic line chart possible in order to move forward with my project.
The graph I am making is NOT time based. It is length based for the X-Axis. The Y-axis is temperature. these values are numeric in their own rows in their own columns. They are also from 2 different queries, but they have the same number of rows.
What am i missing here?????
- Anonymous1 year ago
Thanks for lbendlin's concern about this issue.
Hi, AndrewTalor
I am glad to help you.
In your example, your Temp and Feet columns are from two different tables, and there is no relationship between these two tables, so when you create a Line chart, Power BI defaults to aggregating the values from the unrelated tables.
You can try the following method:
Create an index column: Create an index column (for example, Index) in each of the two tables, and make sure that the values of the index column are one-to-one in the two tables. Then create a relationship between the two tables in Power BI.You can also use the Merge Queries feature in the Power Query editor to merge the two tables into one by using the created index columns.
I have attached the pbix file for the above example below, hope it helps you.
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Fen Ling,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
6 Replies
- lbendlin
Super User
the most basic line chart possiblenot so sure about that. Basic line charts work on the premise that the x axis is the line dimension. For vertical lines or lines that fold back on themselves you need to use connected scatter plots.
Connected Scatterplot (Lines with Custom Paths) | Vega-Lite
What's your expected outcome based on the sample data?
- AndrewTalorNew Member
Thank you for the reply. This is what im expecting. I got this to work maybe because they are both in the same table on the same query? Where my original data comes from different tables. That's the only difference I can see.
- AndrewTalorNew Member
Also, the line is not expected to fall back on itself as the x axis is continuous. i.e. feet. 1,2,3,4,5,6,7,8,1400 ft
- AndrewTalorNew Member
If I put data into the same table, it works. If I split them then it does not work as pictured. My data comes from many different tables. I tried to merge them, but that does not seem to work.
- lbendlin
Super User
Use explicit measures.
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.
Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
- AnonymousNot applicable
Thanks for lbendlin's concern about this issue.
Hi, AndrewTalor
I am glad to help you.
In your example, your Temp and Feet columns are from two different tables, and there is no relationship between these two tables, so when you create a Line chart, Power BI defaults to aggregating the values from the unrelated tables.
You can try the following method:
Create an index column: Create an index column (for example, Index) in each of the two tables, and make sure that the values of the index column are one-to-one in the two tables. Then create a relationship between the two tables in Power BI.You can also use the Merge Queries feature in the Power Query editor to merge the two tables into one by using the created index columns.
I have attached the pbix file for the above example below, hope it helps you.
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Fen Ling,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.