Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

Count per month

Hi to the big community,

 

I am strugling with the below case:

I need a column chart per month which present the count of the rows which Month of Date_b is greater than Month of Date A until the month of Date_B. To be more clear if my data was the row in the table the result would be the below:

 

Jan=0

Feb=0

Mar= 1 (in id=2 Month(date_B)-Month(date)=3)

Apr=1 (in id=2 Month(date_B)-Next Month (Date_A)=2)

May=1 (in id=2 Month(date_B)-Next Next Month (Date_A)=1)

June=0 (in id=2 Month(date_B)-Next Next NextMonth (Date_A)=0)

Jule =0 (in id=2 Month(date_B)-Next Next Next Next Month (Date_A)=-1)

.

.

Dec=0 (in id=2 Month(date_B)-Next Next Month (Date_A)=-8)

 


Sample Data:

Id

Date_ADate_B

2

11/3/202125/6/2021
   

2 Replies

  • Neither the explanation nor the sample data is sufficient.  Please restate the issue and provide some more sample data .

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi and thanks for the reply.

       

      My goal is to have a countrow of the table for each month depending the pending orders. So, Date_A is a Order Date and the Date_B the Shipping Date. So in Jan(31/01) we have no pending orders. Same in Feb(28/2). In the March we have 1. In the April 1, in May 1, in June 0...
      I am trying to build a column chart with x axis all the months and  values how many pending orders in each month.

       

      Thanks in advanced.