Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Administrator
3 years ago
Solved

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 ...
  • Anonymous's avatar
    Anonymous
    3 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.