Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
I am working in a model that needs do do a TOTALYTD calculation, with a different start/end of year, and I need to pass the end date of the year as a parameter of some sort.
When I use this, it works:
It simply returns the calculation based on the standard calendar, ignoring the new end date passed.
The parameter is set when the dataset is loaded the first time from a list with all the end dates of every month.
Is what I am doing possible?
Solved! Go to Solution.
@merep , I doubt as of now, it does not support dynamic string.
if you have only few values to support you can write like
Switch(selectedvalue([Year end]) ,
"30/6", TOTALYTD([CTB PL mov], CALENDAR[Date], "30/6"),
"31/7", TOTALYTD([CTB PL mov], CALENDAR[Date], "31/7"),
// add others
TOTALYTD([CTB PL mov], CALENDAR[Date], "31/12") //default
)
@merep , I doubt as of now, it does not support dynamic string.
if you have only few values to support you can write like
Switch(selectedvalue([Year end]) ,
"30/6", TOTALYTD([CTB PL mov], CALENDAR[Date], "30/6"),
"31/7", TOTALYTD([CTB PL mov], CALENDAR[Date], "31/7"),
// add others
TOTALYTD([CTB PL mov], CALENDAR[Date], "31/12") //default
)