This basically does is aggregates for the dimension product and counts the number of entries for the product where Date2 has a value.
Is there a way to write this expression to be free from the current selections like we can do in set analysis and which may be better on performance, may be using Set Analysis?