Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm trying to count the number of Customers that have bought a package the last month.
If(AmountGross>=0,If(istext(Package),Count({< max(DateTrans) >= date(today()-31) >}Distinct ConsumerId)))
I have a couple of refunds that's why I need AmountGross >=0.
The reason I'm checking if Packages exist is because I'm reading out a log with both single and package sales.
But this doesn't work.
This expression gives me data on my current filtering, but I only want to know the last month.
If(AmountGross>=0,If(istext(Package),Count(Distinct ConsumerId)))
You have an expression as the left side of your Set Modifier. That must be a field.
You can try something like:
If(AmountGross>=0,If(istext(Package),
Count({<[Consumer Id]={'=Max(DateTrans)>=Date(Today()-31)'}>}
Distinct ConsumerId)))
I'd probably try it with just the Count() function first to make sure that part is working as expected.