Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I'm having trouble with this formula:
COUNT({<SomeOtherDate={"$(='>=' & Min(Date) & '<=' & Max(Date)"}>} apples)
It filters Min(Date) correctly, but doesn't include Max(Date) in calculation as the comparison operator was '<'.
For example, formula COUNT({<SomeOtherDate={"$(='>=' '2020-09-01') & '<=' & '2020-09-30'"}>} apples)
would include dates 2020-09-01 to 2020-09-29. I want my 2020-09-30 in.
Can somebody help with this issue?
Are you sure that your datamodel hold data for SomeOtherDate = 2020-09-30? If so then make sure that the SomeOtherDate is in fact a date and note a timestamp that holds an decimal value as well?
You could try this expression expanding the interval to the end of the date '2020-09-30 23:59:59'.
COUNT({<SomeOtherDate={"$(='>=' & Min(Date) & '<=' & Max(dayend(Date))"}>} apples)
Are you sure that your datamodel hold data for SomeOtherDate = 2020-09-30? If so then make sure that the SomeOtherDate is in fact a date and note a timestamp that holds an decimal value as well?
You could try this expression expanding the interval to the end of the date '2020-09-30 23:59:59'.
COUNT({<SomeOtherDate={"$(='>=' & Min(Date) & '<=' & Max(dayend(Date))"}>} apples)
try this:
COUNT({<SomeOtherDate={"$(=>2020-09-01<=2020-09-30"}>} apples)
COUNT({<SomeOtherDate={"$(=>$(=min(otherdate))<=$(=max(otherdate))"}>} apples)
Floor function solved the problem, thank you 🙂