Parameters are the way users can input a fixed value into tableau but they do not do anything themselves - they have to be backed up with a calculated field or a filter
you didn't provide a twbx workbook so I can't see your data or the viz - I am interested in why you chose to use string for the parameter rather than date or integer -
but given that you did and assuming you have a dimension [Date] that is actually a date then you can create a calculation as shown in this superstore example
it will return this
If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution. Thank you.
For ytd you can use below formula based on yr parameter:
year([date])=int([param year]) and DATEPART('dayofyear',[date])) <= DATEPART('dayofyear',today())
Hope it helps.