Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MDX ParallelPeriod issue (SSAS Cube)

Status
Not open for further replies.

PerlIsGood

Programmer
Jan 24, 2002
154
US
The ParellelPeriod code below has worked in other queries, but plugging it into this one is not giving expected results and I can't figure out why. I've also included a simplified view of the output. Simply put I just want the rate increase/decrease between 2/2009 and 2/2010... Any help would be greatly appreciated.
Code:
WITH 
MEMBER [Risk CSU Rate] AS -SNIP-
MEMBER [YearMonth].[Year Month].[B/W] AS 
    (
        [YearMonth].[Year Month].[2010-02] 
        - 
        ParallelPeriod
        (
            [YearMonth].[Year Month].[Year Month],
            12,
            [YearMonth].[Year Month].[2010-02]
        )
    )
    /
    ParallelPeriod
    (
        [YearMonth].[Year Month].[Year Month],
        12,
        [YearMonth].[Year Month].[2010-02]
    ),FORMAT_STRING="Percent"
MEMBER [Market].[Market].[Lead 6] AS -SNIP-
MEMBER [Market].[Market].[World Markets] AS -SNIP-
SELECT 
{
	{[Risk CSU Rate],[Manual CSU Rate],[Low Risk CSU Rate]
	,[High Risk CSU Rate],[Current CSU Rate],[Delinquent CSU Rate]} *
	
	{[YearMonth].[Year Month].LastChild
	,[YearMonth].[Year Month].LastChild.Lag(12)
	,[YearMonth].[Year Month].[B/W]}
} ON COLUMNS,
{
	[Market].[Market].[All]
	,[Market].[Market].[Lead 6]
	,[Market].[Market].[World Markets]
	,[Market].[Market].[Market]
} ON ROWS
Code:
	Risk CSU Rate	Risk CSU Rate	Risk CSU Rate
	2010-02	2009-02	B/W
Market	5.20%	5.21%	-1.#IND
Market	5.37%	5.42%	-1.#IND
Market	4.79%	4.69%	-1.#IND
Market	10.80%	10.90%	-1.#IND
Market	5.89%	6.19%	-1.#IND
Market	2.63%	3.16%	-1.#IND
Market	2.66%	2.58%	-1.#IND
Market	8.33%	6.08%	-1.#IND
Market	1.67%	1.45%	-1.#IND
Market	1.98%	2.46%	-1.#IND
Market	3.07%	3.00%	-1.#IND
Market	14.77%	13.58%	-1.#IND
Market	3.49%	3.36%	-1.#IND
Market	3.62%	2.76%	-1.#IND
Market	21.26%	21.25%	-1.#IND
Market	3.34%	3.12%	-1.#IND
Market	8.78%	9.74%	-1.#IND
Market	7.07%	5.42%	-1.#IND
Market	6.74%	6.44%	-1.#IND
Market	3.83%	3.61%	-1.#IND
Market	3.63%	4.21%	-1.#IND
Market	8.99%	8.02%	-1.#IND
Market	3.24%	3.08%	-1.#IND
 
Well, you are using LastChild, which operates on a specific Member. But it appears as though you are using it on your Year Month level. Are you sure you don't want to use the ClosingPeriod function?
 
I took your suggestion and swapped out LastChild with ClosingPeriod... I get the same column results but the [B/W] column is still spitting out -1.#IND. Any idea why that is?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top