That /td] should not have been there, I removed it from the expression.
You should have two queries - one feeding your prompt and another for the report.
In the prompt query you can use something like children([2019]) or even just the month level.
In the report query you should have the three data items like I said.
The month data item should have
#sb(promptmany('YTD','token','Month Not YTD'))#
Another problem there - the parameter data type needs to be token, not mun. The sb wraps the returned value from the prompt function in square brackets. The prompt function defaults to Month Not YTD.
So if the checkbox isn't selected, the data item would look like:
[Month Not YTD]
but if the checkbox is selected the end result would be:
[Month YTD]
It's simply a complicated way of selecting the correct data item that you want. When the checkbox is selected the selected month will be wrapped in the periodsToDate function, whereas if the checkbox is not selected it will just return the month.