You said that you don't want to have your result be dependend by selections on dimensions, but you want limit the of lines shown to the dimensions selected, right?
I think to get your results independent from the dimension values, you will need to use the TOTAL qualifier, and you already use it. The set expression will be evaluated once for the complete chart, so it will not regard dimension values. Since you clear selection on PDV, Deposito and Divisione Vendita, your chart will not be limited to your selection, if you want to have this, just remove part or all of the set expression, like:
if(Dimensionality()<=3,count(distinct TOTAL [Data rilevazione]),
if(Dimensionality()=4,count(distinct TOTAL <[Anno rilevazione]> [Data rilevazione])
Not 100% sure if this is what you want, that's just how I understand your post.