How-to: Line chart for 2 metrics over time?

Dear Metabase User,

I am struggling to find an visual answer to the question: how COVID pandemic affected total sum of transactions performed by each client in the dataset?

In the Transactions table I have:

| transaction_timestamp | amount | client_name |
| 2020-01-01 08:00:00 | 5.95 | Apple |
| 2020-01-01 08:05:00 | 0.75 | Google |
| 2020-02-01 08:15:00 | 4.25 | Apple |
(continues for ca 100 clients and 10 months of 2020)

I want to:

  1. know how much each client spent per month
  2. plot all clients into one chart (X=Months, Y=Sum_of_Amounts), so one line represents one client, and I can see the trend (growing or declining or staying same).

I assume I need a Line chart, but I can’t construct it using the GUI. In fact, I’d like to get something similar to this chart (https://www.metabase.com/docs/latest/users-guide/images/visualizations/area.png) but using lines, not areas.

I will have ca 100 lines, so probably I will add a filter to bin clients into segments by consumption, or any other criteria I may have.

Please help how to build it. Thank you!

Hi @zahhar
Maybe I’m misunderstanding, but aren’t you just looking for “Cumulative sum of Amount” grouped by “Transaction Timestamp : Month” and “Client Name”?

@flamber I’ve always had trouble with cumulative values over time when you throw in a second dimension. The summary value doesn’t distinguish between the second dimension, it looks like it’s working but when you look at the values they’re clearly not correct. It’s a running total across both dimensions.

Below you’ll see that the individual count values on the left don’t add with the cumulative count values on the right. The total count across both Categories is 126, but the cumulative count for Doohickeys is 117 and Gadgets is 126.

e.g.

@notrom Sounds like you’re requesting this:
https://github.com/metabase/metabase/issues/2862 - upvote by clicking :+1: on the first post

@flamber yes I think you’re right, I’ve upvoted. It’s functionality I’ve given up trying to use despite it being useful. I only raised it as you put it forward as a solution to OP problem, yet I’ve neve had it work as expected. Would be great to see this working as most users would expect.

Cheers