Photo by Alex Padurariu on Unsplash | How to Coda dummy data?

How to Coda dummy data?

Fill out dates & turnover in seconds

Christiaan Huizer
3 min readFeb 28, 2022

--

I came across a question in the Coda community about top 10 sales. The user did not add a doc nor screenshots. When I help I often generate a table that might look like the table the user has in mind. This table it is about dates and money.

We use a button

To generate a list of weeks we apply something rather simple, see below:

rapid creation of date data

I start with the creation of a full year using a Sequence() on the start of the year and the end of the year. Both numbers are always the same. Jan 01 and Dec 31. The only variable is is the year and since it is nice to have a relevant year, I went with Today().Year(). We apply ToDate() to turn the text string into a date.

Next I only needed the weeks and this I got via filtering on a Sunday (my week starts at a Monday, so Sunday is day number 7). This list of numbers I put into a table via AddRow() and as you can see the CurrentValue is the filtered date. Via 3 columns I ask for a specific property to that date:

  • the week number
  • the date (the CurrentValue)
  • the weekday name

Generate Numbers

To get for each row a different number I assumed I could use the rather new function RandomSample() in the button, it did not work. I got the same number for every row. Nevertheless on the canvas it works fine (the 1 is replaced by the count of the table):

RandomSample on the Canvas

Instead I use RandomSample() in the option ‘value for new rows’ and I ask for one value (one per row). This works fine and fast. I started with a text column and formatted into currency.

One random value per row

The result is a blend of two functions: one via the button and one via value for new rows. The result is a table that can be used to demonstrate formulas and functions.

The outcome

I hope you enjoyed this article. If you have questions feel free to reach out. Though this article is for free, my work (including advice) won’t be, but there is always room for a chat to see what can be done. Besides you find my (for free) contributions to the Coda Community and on Twitter

My name is Christiaan Huizer and I am the owner of Huizer Automation. A company specialized in serving SME in harvesting data and keeping it aligned. I am a Coda Consultant & Expert and rely mainly on Coda, Mailjet, Zapier & Paperform to get the job done.

Huizer Automation — Coda Expert and Consultant on “How to Coda dummy data?”

--

--

Christiaan Huizer

I write about Coda.io - AI and (HR )planning challenges. You find blogs for beginners and experienced makers. I publish about once per week. Welcome!