Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
CustomerId | Name |
---|---|
1 | A |
2 | b |
3 | c |
4 | d |
ProductId | CustomerId | Invoice_Date |
---|---|---|
prod_1 | 1 | 01-01-2016 |
prod_2 | 2 | 01-01-2018 |
prod_3 | 3 | 05-06-2016 |
prod_4 | 1 | 10-01-2018 |
prod_5 | 4 | 05-07-2017 |
I have two tables one is Customer and another one is product table,I need to get Active and Inactive Customer Report
The Rules for Active and Inactive are
1.The customer who bought product which is less than a year from the current date is considered to be Active
2. The customer who bought product which is more than a year from the current date is considered to be Inactive
Result Chart:
Total no of Active Customer is 3
Total no of Inactive Customer is 1
Try something like:
Active:
=Count( Distinct {<CustomerId={"=Addyears(Max(Date),1)>=Today()"}>} CustomerId)
Inactive:
=Count( Distinct {<CustomerId={"=Addyears(Max(Date),1)<Today()"}>} CustomerId)
Try something like:
Active:
=Count( Distinct {<CustomerId={"=Addyears(Max(Date),1)>=Today()"}>} CustomerId)
Inactive:
=Count( Distinct {<CustomerId={"=Addyears(Max(Date),1)<Today()"}>} CustomerId)