Switch by date with measure

Hello EDNA - help w/ why this may not be working. current error: The end of the input was reached.

I want to multiply rate by the sum of pieces measure. this rate will very depending on the period selected in the date slicer (disconnected calendar).

based on what I have found I put this together. PBI fill will come if required. just hoping someone can see the error that I might have in my formula:

Pieces Max Pcs Count Spend = 
VAR _Selecteddate = SELECTEDVALUE(CalendarFree[Date])

RETURN

SWITCH(TRUE(),
_Selecteddate >= DATE(2025,3,1), [Pieces Max Pcs Count]*0.028,
_Selecteddate >= DATE(2024,9,1), [Pieces Max Pcs Count]*0.024,
_Selecteddate >= DATE(2024,3,1), [Pieces Max Pcs Count]*0.018,
_Selecteddate >= DATE(2023,7,1), [Pieces Max Pcs Count]*0.012
)

thank you in advance,

Frankee

Hi @Frankee ,

Welcome back to Forum. Maybe if you could attached PBI also (to see Pieces Max Pcs Count and whole context). I enter few basic lines in Excel and seems your formula works - so I believe it is the context.

Thank you.