Forum Discussion
Dynamic variable calendar for column chart
PowerBI_Canuck It is not possible for a DAX table to update based on a slicer selection, only measures are calcualted after the slicer selection Power BI Order of Operations
You don't need your Calendar table to change range though, only the visual, which happens automatically if you set the slicer to date 'before'.
If I'm understanding you correctly, I think the only piece you're missing is that you want to also limit the start/from date. It sounds like you want the start date to equal the first date of the ERP period. So, add a column to your Date table (again I suggest you create this in Power Query) that is called Calendar[ERPperiod] and then you can add a filter to your measures that defines
VAR _erp = MAX(Calendar[ERPperiod])
RETURN
CALCULATE([measure], Calendar[ERPperiod] = _erp)
and that will limit the start date. There's other ways to do this too using an approximate lookup and basing on start of ERP date, etc. but this one should work.