Count rows per day

Hi,

How can I count the Orders that are in Progress per day?

So orders that are not delivered. For Example:

Yesterday: 20 Orders in Progress
Today: 10 orders in Progress

Count orders today in total must be 30. White expression can I use for this?

Thanks

Hi @RetouwS
You would filter by "Progress" and then summarize by "Cumulative Count" grouped by "Date". But it's hard to tell how your data is and if you need to do other things, but the example you're giving does not need an expression.

Thanks for replay!

What do you exactly mean by "Grouped by Date"? I have a order date but that gives me not the count of Orders in Progress. That gives me the count of New orders per day.

Maybe this example is better:

1 May 2021: 20 orders in Progress
2 May 2021: 18 orders in Progress (2 orders are delivered)
3 May 2021: 21 orders in Progress ( 3 New orders in progress)
4 May 2021: 15 orders in Progress ( 6 orders are delivered)
5 May 2021: 12 orders in Progess ( 4 orders are delivired and 1 New orders in Progress)
Etc

We connect to MySQL database

@RetouwS Post "Diagnostic Info" from Admin > Troubleshooting.
I don't understand what "Progress" is - it could be a column with a state, but I don't know your data.
This is what you could do:

Otherwise you need to post an example of your data.

"Progress" is the order status. Column is " Order State". We have different order status.
We want count daily the state of "Progress" (ups and downs)

@RetouwS I don't understand. So you actually don't have a value in your database called "Progress", but you have multiple states that you then want to add/detract, which then give you the current state?
Sounds like you need to make two queries, but without seeing the data, it's difficult to tell.

Yes we have the value "Progress" in the column "Order State". It is a part of our workflow.

Workflow Orders: "New Order" -> "Progress" -> "Pending" -> "Delivered" -> "Closed"

We want; Count the total Orders with state "Progress".

@RetouwS Okay, do exactly what I showed in the screenshot above.

I think my problem is that I have no Date column...Only 'Created At" column but that is for new orders.

Is it possible to make a "fake" column that return dates?

@RetouwS How are you supposed to create a query that "Count rows per day", like you topic title is, if you don't have any date columns?

Again, I would have been able to give you an answer in my first comment if you included an example of your data, and "Diagnostic Info" from Admin > Troubleshooting.

We need the counting for the Trend visualization.

I can't go to Metabase at the moment. So I can t give you the Diagnostic Info.

@RetouwS Trend visualization requires a date, so since you don't have that, then I think you need to find other options.
https://www.metabase.com/docs/latest/users-guide/05-visualizing-results.html#trends