Forum Discussion
Dynamic date filter
Hello! I need to fix the year in the FIRST formula according to the first year of the filter object of the calendar table and repeat it in all periods in order to obtain the accumulated variation in each period of LAST with respect to FIRST
Thank you!!
- Anonymous3 years ago
Hi Syndicate_Admin ,
Based on your description, you want to dynamically get the minimum year selected on the slicer, right?
You can use it.
_First = var _year=YEAR(FIRSTDATE('_Calendar'[Date])) return CALCULATE([_LAST],YEAR(_Calendar[Date])=_year && MONTH(_Calendar[Date])=12)If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- IdrissshatilaSuper User
Hello Syndicate_Admin ,
check this video https://youtu.be/iveCss_hzDo
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍
- AnonymousNot applicable
Hi Syndicate_Admin ,
Based on your description, you want to dynamically get the minimum year selected on the slicer, right?
You can use it.
_First = var _year=YEAR(FIRSTDATE('_Calendar'[Date])) return CALCULATE([_LAST],YEAR(_Calendar[Date])=_year && MONTH(_Calendar[Date])=12)If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.