I need to duplicate the excel function PRODUCT(1+D76:K76)-1

I need to replace the line Sum(Rtn) as Year with
PRODUCT(1+D76:K76)-1 where rtn would be the columns
my current sql is :

SELECT

Sum(Rtn) as Year,

Sum(case when Month([Date])=1 then Rtn else null end) as [1],

Sum(case when Month([Date])=2 then Rtn else null end) as [2],

Sum(case when Month([Date])=3 then Rtn else null end) as [3],

Sum(case when Month([Date])=4 then Rtn else null end) as [4],

Sum(case when Month([Date])=5 then Rtn else null end) as [5],

Sum(case when Month([Date])=6 then Rtn else null end) as [6],

Sum(case when Month([Date])=7 then Rtn else null end) as [7],

Sum(case when Month([Date])=8 then Rtn else null end) as [8],

Sum(case when Month([Date])=9 then Rtn else null end) as [9],

Sum(case when Month([Date])=10 then Rtn else null end) as [10],

Sum(case when Month([Date])=11 then Rtn el

**View Complete Post**

## Excel 2007 Cubeset function - Retrieve subset of customers based on state

I am working on making a report dynamic by allowing a user to choose a State and have the cubeset function return that State's customers.

I have the following

Cell $P$5 =CUBESET("Connection", "[Order Ship to Code].[Order Ship To State].[All Order Ship to Geography].children", "Ship to State")

Cell P6-P32 = CUBERANKEDMEMBER("Connection",$P$5, ROW(A1*)) *A2, A3, etc.

Cell $A$2 = "CA" ("CA" is choosen in the list of states based on a validation list pointing to the CubeRankedMembers in P6-P32)

=CUBESET("Connection", "[Customer Dimension].[Customer Name].[All Customer Dimension].children", "Customers") returns all customers

I have not been able to write a CubeSet function that combines the two sets to retrieve, for example, California Customers

This two functions I have written that are not working correctly...

=CUBESET("Connection", "([Order Ship to Code].[Order Ship To State].[All Order Ship to Geography].["&$A$2&"],[Customer Dimension].[Customer Name].[All Customer Dimension].children)", A$2&" Customers")

=CUBESET("Connection","[Order Ship to Code].[Order Ship To State].[All Order Ship to Geogra