1. Create an Aggregation Table with values: Daily, Monthly, Yearly.
2. Create a DAX Measure using SWITCH to adjust aggregation:
Sales Aggregation = 
SWITCH(
    SELECTEDVALUE(AggregationTable[Aggregation], "Daily"),
    "Daily", SUM(Sales[Amount]),
    "Monthly", CALCULATE(SUM(Sales[Amount]), VALUES('Date'[YearMonth])),
    "Yearly", CALCULATE(SUM(Sales[Amount]), VALUES('Date'[Year])),
    SUM(Sales[Amount])
)
3. Add a Slicer using AggregationTable[Aggregation] and use Sales Aggregation in a line chart.