Controlling Null Values without Impacting Totals

I have a table visual grouped by several parameter controls. The formulas for period 1 and period 2 looks like this:

ifelse(

${MeasureSelect} = ‘Dollars’,

sumIf(SalesTotal, in(depletionmonth, ${P1DateInt})),

${MeasureSelect} = ‘Cases’,

sumIf(Cases, in(depletionmonth, ${P1DateInt})),

The date parameters are integers we link to the dataset. The issue I’m having is the table displays products with null sales for selected period as long as there has been sales in a prior period. I’ve tried null handling with a filter like :
ifelse(isNull({Period 1}) AND isNull({Period 2}), 0, 1) but this impacts totals for other metrics i’m using like rolling 12 month sales. Is there a way to control for this without impacting other metrics?

Hi @dspringer,
This may be somewhat dependent on how your dataset is structured or other variables in affect, but as a work around, what if you tried setting up a filter around an extreme number that won’t come into play, so that you can use the ‘exclude nulls’ option (this way the only thing affectively being filtered out are nulls: