Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi all ,
i have a line chart with one expression that retrieve count value for every day.
i want to add an expression to count same value for the previous 30 days / 1 month
any ideas?
dimension is date DD-MMM-YY
first expression : Count({<invoice_count={1}>+<order_count={1},MM=>} DISTINCT client_id)
HI,
Try like this
=Count({<invoice_count={1}, MM=, DateFieldName={''>=$(=AddMonths(Max(DateFieldName), -1))<=$(=Date(Max(Date)))'}>+<order_count={1},MM=, DateFieldName={''>=$(=AddMonths(Max(DateFieldName), -1))<=$(=Date(Max(Date)))'}>} DISTINCT client_id)
Regards,
jagan.
Hi,
Change DateField according to your application.
Count({<DateField={">=$(=Date(monthstart(addmonths(Max(DateField),-1)),'DD-MMM-YYYY'))<=$(=Date(Monthend(addmonths(Max(DateField),-1)),'DD-MMM-YYYY'))"},invoice_count={1}>
+
<DateField={">=$(=Date(monthstart(addmonths(Max(DateField),-1)),'DD-MMM-YYYY')) <=$(=Date(Monthend(addmonths(Max(DateField),-1)),'DD-MMM-YYYY'))"},
order_count={1},MM=>} DISTINCT client_id)