Here are my measures:
Avg Total Sales = calculate( [Sales 2Y] + [Sales LY] + [Sales TY RR])/3
Sales 2Y =
calculate(
sum(PBI_AEP_Shipments_Multi[Ext Unit Price]),
filter(PBI_AEP_Shipments_Multi,
PBI_AEP_Shipments_Multi[Year]=[Year 2Y]))
Sales LY =
calculate(
sum(PBI_AEP_Shipments_Multi[Ext Unit Price]),
filter(PBI_AEP_Shipments_Multi,
PBI_AEP_Shipments_Multi[Year]=[Year LY]))
Sales TY RR =
CALCULATE([Sales TY]/[Current Month])*12
Sales LY by Rank =
CALCULATE( [Sales LY],
FILTER( VALUES( PBI_AEP_CustMaster135[CUSTOMER NAME - CODE]),
COUNTROWS(
FILTER( ‘Customer Rank Group’,
RANKX( ALL( PBI_AEP_CustMaster135[CUSTOMER NAME - CODE] ), [Avg Total Sales], DESC ) >= ‘Customer Rank Group’[Min]
&& RANKX( ALL( PBI_AEP_CustMaster135[CUSTOMER NAME - CODE] ), [Avg Total Sales], DESC ) <= ‘Customer Rank Group’[Max] ) )
0 ) )
Sales TY RR by Rank =
CALCULATE( [Sales TY RR],
FILTER( VALUES( PBI_AEP_CustMaster135[CUSTOMER NAME - CODE]),
COUNTROWS(
FILTER( ‘Customer Rank Group’,
RANKX( ALL( PBI_AEP_CustMaster135[CUSTOMER NAME - CODE] ), [Avg Total Sales], DESC ) >= ‘Customer Rank Group’[Min]
&& RANKX( ALL( PBI_AEP_CustMaster135[CUSTOMER NAME - CODE] ), [Avg Total Sales], DESC ) <= ‘Customer Rank Group’[Max] ) )
0 ) )
Gain/Loss TY v LY by Rank =
CALCULATE( [Gain/Loss TY v LY],
FILTER( VALUES( PBI_AEP_CustMaster135[CUSTOMER NAME - CODE] ),
COUNTROWS(
FILTER( ‘Customer Rank Group’,
RANKX( ALL( PBI_AEP_CustMaster135 ), [Avg Total Sales], DESC ) >= ‘Customer Rank Group’[Min]
&& RANKX( ALL( PBI_AEP_CustMaster135 ), [Avg Total Sales], , DESC ) <= ‘Customer Rank Group’[Max] ) )
0 ) )