Forum Discussion

MYDATASTORY's avatar
MYDATASTORY
Resolver I
6 years ago
Solved

How to count current stock

Hi,

I have a simple query, on a count, but not sure which of these functions I should; Count; COUNTAX; I would like to accomplish below; I would like to show this month by month.

Metadata: 

Bought Date ==>The date  the car was bought for sale (stock)

Sold Date       ==>The date  car was sold

Return Date   ==> The date car was returned 

I would like to ::::Count Cars in stock =Sold Date -Return date  

 Expected answer:   Sold 3 cars and 1 returned car = 2  (Count Cars in stock)

   

Please below Dummy date

Car ID                                Bought Date           Sold Date             Return date (unhappy customer id)

1                                         01/01/2020            11/01/2020

2                                         02/01/2020            12/01/2020

3                                         06/01/2020            10/01/2020         12/02/2020

4                                         10/01/2020           

5                                         15/01/2020   

Thanks in advance      

 

2 Replies