Although the seemingly intuitive thing is to add a parameter in the "Dataset Properties" window, it does not actually declare the parameter for the query for some odd reason.
To add a parameter, click the "Parameters" button in the "Query Designer" window. From there, you can add your parameter names and default values.
Once you do this, the list of global parameters will contain this parameter and allow you to use expressions, etc.
source share