2

I'm trying to create two lines on the same graph, with one being 'Line A' based on Data labeled 'A' and 'Line B' based on B.

The X-axis would be the date and would expand over time as more entries were added. The weight would be the Y-axis.

I can't seem to convince Google sheets to separate out the data based on the 'Name' column into two lines. Any help would be appreciated.

An example of data I'm trying to graph with two lines

1 Answer 1

3
  • your data should be in this format:

0


  • if this is not the option you can transform it with this formula:

=QUERY(A1:C, "select B,sum(C) where A is not null group by B,C pivot A", 1)

0

4
  • Is there a way to do the same where the data for A and B would be on different sets of dates? My data is structured in the same way as your first image but A and B occur on different dates, this results in dots rather than lines.
    – Chris A
    Aug 3, 2023 at 13:37
  • docs.google.com/spreadsheets/d/…
    – Chris A
    Aug 3, 2023 at 13:45
  • 2
    @ChrisA i.stack.imgur.com/1Dvd0.png
    – user0
    Aug 3, 2023 at 14:21
  • 1
    Great work, thanks!
    – Chris A
    Aug 3, 2023 at 17:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.