Forum Discussion

AndrewTalor's avatar
AndrewTalor
New Member
1 year ago
Solved

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?????

  • Anonymous's avatar
    Anonymous
    1 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

  •  the most basic line chart possible 

    not 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?

    • AndrewTalor's avatar
      AndrewTalor
      New 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.

    • AndrewTalor's avatar
      AndrewTalor
      New 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

  • 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.

     

  • Anonymous's avatar
    Anonymous
    Not 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.