Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I would like to get a range of dates selected (from a certain datefield in the data model) when some other selection is done in a filter pane.
For example filter pane has "Last 6 Months" and when selected this will go ahead and dynamically apply a filter to CalDate column something like CalDate >= 17/12/2021 and CalDate <= 17/06/2022 (in DD/MM/YYYY format)
How would you do this? The selection in the filter pane will be minimum like 2-3 of them, which will be via an Inline Table from script. They will be last 6, 9 and 12 months. I can write an (nested) If clause, if necessary.
Best,
Bilal
Hi, you can add a field the the filters table to add a number with the months, and use this number in set analysis, to filter CalDate it could be:
Sum({<CalDate={">=$(=AddMonths(Max(CalDate),-$(=NumMonthsFieldName)))<=$(=Max(CalDate))"}>} Sales)
Maybe needs some adjustments to add date format or in there are more than one filter selected