Calculating Daily Sale Order

Hello Dear All,

I am doing an analyze for a supplier company’s inventory. The data-set is like this in the image below.

The data set is for the last 4 years, and I just want to calculate the daily cases for each product, for determining the amount of Sale order per day for each product.

I would appreciate if you could advice me a way to calculate avg daily sale order for each product id.

Thank you so much and have a nice working days :slight_smile:

OK, I solved the problem :slight_smile:

By selecting Product_Id as a dimension in an OLAP table, and with this KPI formula:
COUNT_TABLE(“PM.csv_CASES”) / DATEDIFF(dd, MIN(“PM.csv”.“Date”), TODAY())

Peace :v:

2 Likes

Thanks for posting your solution on here :slight_smile:

Actually, according to the database of my case study, the last day is “2019-11-07”. Is there a way to set a specific date instead of " TODAY() " ?

Thank you.

Nice, I also found how to do it :sweat_smile:

I could set a specific date for the KPI formulation by this code:
TO_TIMESTAMP(‘2019-11-07’, ‘YYYY-MM-DD’)

:slight_smile:

1 Like