Unfortunately, I don't believe there is a way to do this naturally without a creative workaround. It seems that you already have a working solution in place.
I have an idea for a hypothetical alternative that may allow for you to leverage a date picker component though. You will need to make these modifications.
- In the data model, for the table and field being filtered, split out the date field to be filtered. So for example, instead of Date = 12/6/2022, you can have 2 fields, Month_Day = 12/6/1970 and Year = 2022.
- Your date picker should operate on the Month_Day field, treating them all as if they were dates in 1970 (or another year of your choosing).
- Your KPIs can be reconstructed to have component filters (or an alteration of the PQL logic) on the Year dimension. This way, you can bring out 2022's results and 2021's results into separate components.
With this method, there may be complications if your date range covers the change of the new year. So for example, if your date range is from 12/6/1970 to 1/5/1971, since there is no data for 1971 since all the years in this column have been equalized to 1970, the data will stop at 12/31.
Hello Tony,
Thanks for your response.
Indeed, I followed Calandra's suggestion here:
https://www.celopeers.com/s/question/0D50700000GC75OCAT/date-comparison-for-component-chart-and-tables?language=en_US
This means no filtering of the date at analysis level, but it works for the intended purpose.
Thanks and best regards