Correct Total by Dynamic Segmentation With Dynamic Parameters

Hi everyone, I need your help in calculating the calculation shown by Sam in the latest YouTube video - Dynamic Segmentation With Dynamic Parameters I have a similar calculation by using RANKX

reg Customer per regionTop 20 = 
    CALCULATE( [Total reg. Customer per regions];
    	FILTER( VALUES( Regions[Postcode] );
    		RANKX( ALL( Regions[Postcode] ); [Total Sales]; ; DESC ) <= [Selected Metric Top 20] ) )

and the total value is not calculated correctly.

Also SUMX and Summerize as shown in the video before doesn’t help me here Does anyone have an idea? For example from Dynamic Segmentation With Dynamic Parameters.

Sometimes these can be a little tough so this is what I basically do myself and probably recommend in this case.

I just updated the below to this

Top Customers Intermediary = 
CALCULATE( [Total Revenue],
    TOPN( [Customer Rank Value], VALUES( Customers[Customer Names] ), [Total Revenue],DESC ))

Then finished with this simple measure which is the common pattern to fix these

Top Customers = 
    SUMMARIZE( 'US Regions', 'US Regions'[Stores],
        "Top", [Top Customers Intermediary] ),
            [Top] )

Instead of having one massive formula that becomes overly complex sometimes a solution like this is just better in my view. And it takes about 2 mins to solve as I know the pattern inside and out.