Chart showing number of rows by date or date range

I have a table containing a Date-and-Time field. I wish to create a chart with a date range that shows rows per day, week, or month.

I have two issues that seemingly make this an impossible problem to solve without restructuring my table, which seems like it should not be a requirement.

  1. I can’t target a date or date range, instead each date is unique due to it being a date-time.

  2. I am unable to count rows, I can only count values within the row, which is not desired. This means counting the total amount of money of all orders is easy, but counting the amount of orders is much more difficult.

Does anyone have a solution for these problems? Am I missing something, or is there an intended method to solve these sorts of problems?

Hi @Andrew_Adkins and Welcome to the community :smiley:

I will solve your problem using a view of your main table, you can create a new section and put it there :slight_smile:

Then, you can create a interactive control that filter that original table according to your preferences (like last month, or last week, or from this date to this date, you can use buttons or sliders, or dropdown’s, your choice)

If the data (rows) that you see are correct you are done, just set the table to appear as the graph you prefer (or duplicate it if more than one is needed)

Then, if you want to count total rows you just have to count those rows that you have just filtered from that table :slight_smile:, if there was not a table you could use =originaltable.filter(date equal to whatever).count (not 100% sure but something like that)

I’m sure that in a while those concept will be super familiar for you, but yeah coda can have a little “hard” learning curve :slight_smile:

If those suggestion doesn’t make the concept clear don’t worry, share a doc and i’ll give it a look :slight_smile:

P.s. or you meant a graph that shows data for every week, month or similar? in this case you’ll need to create another table that act as the “grouper” of the original one, but it’s harder to think that to do so don’t worry also that can be done pretty much easily :smiley:

1 Like

I did not want to make this sort of post, but I guess I should at least mention that I am still searching for the solution to this problem and will attempt to document my method of solving it when I get there. Thanks for your reply!

Sorry to not have your solution :frowning:

Just as a recap to help you find your way, see dates as numbers, now you can easily set a period and check if it’s in between, like 1<X<4 and you get your point 1. Answer

For the point n° 2. ‘.count’ on a filtered table will give you your desired output

Share your way then :slight_smile: