Forum Discussion
Datepicker filter
Hi disney_batista ,
According to the error message, it seems like what you are trying to create is a measure. The issue is due to the measure formula needing an aggregation function to handle the multiple values in your 'D_Calendar'[Date] column, you can modify your formula to include an aggregation function like MAX, MIN, SUM or AVERAGE etc. on that column...
In addition, please review the following links. Hope it can help you.
Create a relative date slicer or filter in Power BI - Power BI | Microsoft Learn
Custom Date Period Selections in Power BI - BI Elite
Best Regards
Hi Anonymous, Thank you very much for your suggestions!
I got what I needed with the second link you indicated (https://bielite.com/blog/custom-date-period-power-bi/).
However, I would like to know if you can help me with a customization.
When using the custom date filter, if I select the last year, when I use the filter with the predefined period "Last Year" again, the filter does not work, because the custom filter with YTD is still applied.
Do you know if it is possible to define a condition so that when I click again on the predefined periods, the custom filter clears?
Or will I always have to use the manual "Clear selections" function?