Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have the following equation
(sum({<[Date]={"$(=Max(Date))"}>}Sessions)
This is giving me the sum of Sessions where the date is the max date.
But the only dates that should qualify for max date is where sum(Sessions) on that day is greater then 0.
Meaning if I have the following table
Date | Sessions |
---|---|
1/1/2017 | 5 |
1/2/2017 | 3 |
1/3/2017 | 0 |
I want my result to be 3. This is the max date where sessions is greater then 0.
Thanks in advance,
May be this:
Sum({<[Date]={'$(=Max({<Date = {"=Sum(Sessions) > 0"}>}Date))'}>} Sessions)
Sunny,
That did not seem to work
My bad, I just changed it... try this:
Sum({<[Date]={'$(=Max({<Date = {"=Sum(Sessions) > 0"}>}Date))'}>} Sessions)
is this also ok?
Sum({<[Date]={"=((Date=Max(Date)) and (Sum(Sessions)>0))"}>} Sessions)