green
12-19-2023Cloud Apps
Date filters - possible to have fixed start date, lagged end date?
We have certain calendar-based metrics that need to be lagged (typically by 15 or 30 days). For instance YTD 2023, but excluding the last 15 days. I haven't been able to figure out how to do thi...
- 12-20-2023
Hi green ,
I would first duplicate my date column in the data model, and then set a custom filter against 'days in duplicated date':
{ "explicit": false, "multiSelection": true, "exclude": { "last": { "count": 15, "offset": 0 } } }
This will filter for days in duplicated date where the days aren't the last 15. You could increase 'count' to exclude more, or manipulate offset to do some really fancy stuff like 'exclude 10 days from 2 days ago'.
You can then add the original date filter and use it in conjunction with this one.
https://sisense.dev/guides/querying/jaqlSyntax/#filtering
Let me know if this works for you?
Thanks,
Daniel
RAPID BI
RAPID BI - Sisense Professional Services | Implementations | Custom Add-ons