It depends how your data is set up... I have this data
As you I have targets for the year, but only actuals to date.
Here it is in Tableau
Tableau recognizes that 6 months are blank/null
Clicking gives 2 options (well 3, we'll come to that!)
Filter data - will do as you describe - filter both sides so only months with both are displayed
Show data - Defaults the Nulls to 0, you can do this via a calculated field
>> IF ISNULL([Actual]) THEN ZN([Actual]) ELSE [Actual] END
3rd option - right click, Hide Indicator.
If you want to control the values, something like this
IF ISNULL([Actual]) THEN NULL ELSE [Actual] END
I'm conscious I may not have answered your query, if not, let me know.
Thanks Mark, this advice is great...it has really helped me.
Glad it was useful