Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

Cummulative Trending View

Hi,

 

I wanted calculate a cummulative view.

My table looks like below,

Loan IDDateStatus
12-JanContracted
13-JanPTD
24-JanContracted
35-JanContracted
41-FebContracted
51-FebContracted
52-FebPTD
21-MarPTD
62-MarContracted
43-MarPTD

 

I wanted to calculate how many loans are there in Contracted and PTD status as of Jan, feb and march.

 

my table should look like this,

 Contracted count PTD Count
Jan21
feb32
march24

 

As of January, There are 3 loans, but for loan id 2 and 3, the last stage was Contracted for that month but for loan ID 1 the last stage is PTD. Therefore, the Contracted Count is 2 and PTD count is 1.

 

As of February,  There are two new loans 4 and 5, the contracted count will 3 since loan id 2 and 3 from the previous month is still in Contracted and loan id 4 in feb is also in Contracted. Therefore the count is 3.

Similarly for PTD, loan id 1 from jan month and loan id 5 from feb is still in PTD. Therefore, the PTD Count is 2.

 

As of March, There is one new loan id 6, the contracted count will be 2 since Loan ID 3 and 6 still remains in contracted (Loan id 2 and 4 has moved to next stage PTD so it is excluded). Similarly for PTD, the count is 4 ( loan id 1 from jan, loan id 5 from feb and loan id 2 and 4 in march).

 

How do i calculate this?

 

my visual should look like

 

Please Help!!

Ashish_Mathur 

 

Thanks, 

Dharani

 

11 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Sir,

       

      This works fine when it is applied to this smaller dataset. but when i apply it to my larger dataset (which is something similar with lot more statuses), the measure 2 and 3 which you have calculated comes to be empty. Please give me any leads where it would have gone wrong.

       

      Thanks,

      Dharani

       

       

      • Ashish_Mathur's avatar
        Ashish_Mathur
        Super User

        If it working on a small dataset, it should also work on a large one.  I cannot guess the mistake which you are commiting.