Tableau: Find Sum min and total min min

My aim is to find

1) distinct  min values
2) then summarize
3) then find for total rows overall min

And the thing is ShopDetail and ItemID I don't want to show to users


Lets look my example data

1) distinct  min values

To get minimum is simple - just MIN([Value]) and they are distinct by first 4 columns


2) then summarize 

To get summarized minimum I use - WINDOW_SUM (MIN([Value])) and compute using ShopDetail 



Then I need to take my table to form I need, so I add ShopDetail to Detail pill as I cannot remove it totaaly - then I could not use compute using correctly. Otherwise Tableau will not understand that I want to calculate min by ShopDetail. 

After doing this my table looks like. There are three times 106 106 106 because we have 3 ShopDetail values in there background


Now I use FIRST() function

IF FIRST() == 0 THEN

    WINDOW_SUM(MIN([Value]))

END

And now I have more real view


To make it even more beautiful you could choose Analysis->Stack Marks -> Off

3) then find for total rows overall min

For determining if row is total or not I use formula 
WINDOW_MAX(max([Customer]))=WINDOW_MIN(min([Customer]))
When I have total row then min and max don't  equal

So my final table calculation looks like

IF WINDOW_MAX(max([Customer]))=WINDOW_MIN(min([Customer])) then

(IF FIRST() == 0 THEN

    WINDOW_SUM(MIN([Value]))

END) else (IF FIRST() == 0 THEN

    WINDOW_MIN(MIN([Value]))

END) end


The only problem is that when you have data where you have only one customer row like Area North has, then the total will not be correct.