I'm trying to develop a metric that shows the number of days of a customer's last purchase.
I tried to do it, for this way:SELECT max (Date (Data de saída da nota fiscal) - this)but this way, I need put in report, the attribute Date (Data de saída da nota fiscal) and not only a metric by customer name. If I don´t put the attribute, the report return error.
Thanks for help.
Best answer by Iva GasparekovaView original
I am afraid, this is the expected behaviour and the way the number of days is counted. May I know, what would be a purpose of a single metric report, please?
Please feel free to check also this post below:
Thank you for your attention.
The objective of this report is, to help the customer success team, monitor the time of customers without purchase order against, purchase frequency time (other metric). Then, I would like to show only the last date and days, not all purchase dates.
I checked the post, but these example (post) also show 6 last invoices.
Thank you fo the clarification, appreciated. I have to admit, it is bit difficult to navigate you without better knowledge of your model and other metric, but maybe you can find some hints in this article, as it describes how to discover the first or last dates when specific events occurred.
Tkank you very much!!! I’m very appreciated for you explanation and hints.