Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello.
I have the following fields: user_id, feedback date, payment date, payment amount. There may be several feedbacks per user, so the payment amounts may be duplicated. I use AGGR to avoid summing duplicate rows and count only unique ones.
I use the following formula to calculate the amount of payments for each review 7 days before it:
SUM({1 <payment_date={"=payment_date>=week_before_n and payment_date<=date_tech_2"}>} AGGR(SUM({1 <payment_date={"=payment_date>=week_before_n and payment_date<=date_tech_2"}, user_id=P(user_id), payment_id=P(payment_id)>}
DISTINCT sum_payments),
payment_date, user_id, payment_id))
This formula works correctly, but the problem is that as soon as I filter a specific user_id, pivot table stops displaying anything at all and I only see "-" instead of the sum amount. How to make it work, including with any filter?
Your expression is set to consider P(user_id)
=SUM({1 <payment_date={"=payment_date>=week_before_n and payment_date<=date_tech_2"}, user_id=P(user_id), payment_id=P(payment_id)>}
DISTINCT sum_payments)
Can you post some sample data?