Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am struggling with set analysis.
I have dataset:
Type | Party_ID | Date | Sales |
Customer | 1 | 1/jan | 1 |
Customer | 1 | 2/jan | 0 |
Customer | 2 | 1/jan | 0 |
Customer | 2 | 2/jan | 1 |
Customer | 2 | 2/jan | 0 |
I want the Max of Sales for the last Date per Party_ID
+ Date can change based on filtering of end-user
+ Party_ID will not be diplayed in end table => there also must be a TOTAL SUM
+ only records where Type='Customer' must be taken into the calcullation.
Result (before removing Party_ID):
Type | Party_ID | Date | Sales | |
Customer | 1 | 2/jan | 0 | |
Customer | 2 | 2/jan | 1 | (=Max) |
This one gave me the wanted result: Sum(Aggr(FirstSortedValue({<RAC_DIMENSION={'CUSTOMER'}>} PURE_CHURN_60D, -Aggr(Max({1<RAC_DIMENSION={'CUSTOMER'}>} CONTACT_TIMESTAMP),[Year-Month], PARTY_ID)),[Year-Month],PARTY_ID))
I already got this formula:
Sum(Aggr(FirstSortedValue({<RAC_DIMENSION={'CUSTOMER'}>} PURE_CHURN_60D, -Aggr(Max({<RAC_DIMENSION={'CUSTOMER'} >} CONTACT_TIMESTAMP), PARTY_ID)),PARTY_ID))
This one gave me the wanted result: Sum(Aggr(FirstSortedValue({<RAC_DIMENSION={'CUSTOMER'}>} PURE_CHURN_60D, -Aggr(Max({1<RAC_DIMENSION={'CUSTOMER'}>} CONTACT_TIMESTAMP),[Year-Month], PARTY_ID)),[Year-Month],PARTY_ID))