Forum Discussion
Filter customer with negative total and group datedif
Hi Louke ,
For you step one, you could create a table visual like the following. Put the two field into it and select the aggregation of amount as the sum. Set up the filter of the amount as "is greater than 0".
For you step two, I don't know the logic of datediff. For example, what is the day interval of customerID 800018?
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hey Anonymous ,
thanks a lot for your reply.
Unfortunately I do not need the table in step one. I just need the logic behind this table.
I need measures to firstly get the customers with a positive total. After that I would like to group the invoices of these customers by the datediff of the dueDate per invoice and the selected deadlineDate.
For the example of customerID 800018, if deadlineDate is "30.06.2021":
| Group | Amount |
| < -10 days | 200,00 |
| -10 to -1 days | 485,14 |