You should be able to see your set expression with the expanded dollar sign expansion when not using a label in your expression (i.e. the expression will be used as label). Then hover over the label and look at your set expresssion.
returns in a text box?
Your set expression is evaluated in global context, not in the context of the dimension value. So if you are using Transaction Date as dimension, the current dimension value will not be used within your expression set expression.