You can use the filter expression before 0 days ago
to only show dates before the current date, or before 0 months ago
to also hide the current (not yet completed) month. You can stack this condition on top of another filter to get the range you want; from the docs:
To get AND logic: Type your conditions, one by one, into multiple date or time filters. For example, you could put after 2014-01-01
into a Created Date filter, then put before 2 days ago
into a Created Time filter. This would mean “January 1st, 2014 and after, and before 2 days ago”.
In a look, you can do this by clicking Filter next to your time dimension, then selecting "Advanced", which gives you a text box to write a filter expression in.
You can also use the always_filter
parameter to make this the default behavior for an explore.
Since it looks like you don't have any data for those future dates, a final option is to turn off "dimension autofill" so that Looker doesn't create rows for the dates in your time range without data. You do that in the look, by clicking on the field. More info here