There is a problem with state/set analysis formula. There are two states for period selection T0 and T1. In these states are time periods selected. For this example this is halfyear. The problem is with permanent customer expression - customers witch stayed both in periods T0 and T1. Expression should be calculated at shop level, and expression shows different figures, when shop is selected or not. For example real permanent customers in shop AP1 are 197, that figure is showed, when shop selection is made. When shop selection is not made, there is figure of 199 customers, that is wrong number, if you look from shop level. How to make formula, that will show exact permanent customers figure either shop selection is made or not.