Till then, If I fully understand you.
I have sthing similar to that;
I have a field called : Year
a Measure : Sum("Car Sales")
Suppose I choose a bar chart:
Measure : Sum("Car Sales")
The result would be:
Since there is no car sales before 2005; I want to eliminate those years from the chart.
We go to complement and uncheck the null values and the work is done :
Now, in the other hand, and even so there is no Car Sales before 2005, when we Add the Year field as a filter pane, we will see all the Years:
The question is How to eliminate these unwanted Years?
Let's ask it a different way; What are the Years we want to eliminate?
=> The Years that have no Car Sales in them:
In other work, If Sum of car sales by year =0 , then replace the Year field by Null, else, if there is sales: keep the Year value:
The expression would be as follow:
Let's create it a master dimension and use it as a filter:
Hope this answers your question!