![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi all, I am trying to fill in the blanks with the last known value. After reading Chp3 in George Spofford's book MDX Solutions (which is a great book), I found the following formula for creating a calculated member on pg 68 that might do the trick: "With Member [Measures].[Last Update of Price] AS 'iif( Not IsEmpty ([Measures].[Price]), [Measures].[Price], iif([Time].PrevMember IS NULL, NULL, ([Measures].[Last Update of Price], [Time].PrevMember) ) )'" However, when I try this code (which is a recursive function), I am get the following error: An unexpected Internal Error has occurred. Can anyone please tell me what I am doing wrong and why I am getting this error message? Does MSAS not like recursive functions as calculated members? Better yet, can anyone please provide me with the MDX I can use for filling in the blanks? I am trying to use it in a Calculated Member called[List Price]. This is what I currently have: Day1 Day2 Day3 Day4 Day5 Prod1 Price $5 $5 $7 This is what I want: Day1 Day2 Day3 Day4 Day5 Prod1 Price $5 $5 $5 $5 $7 Day3 and Day4 uses Day2's price of $5 even though Prod1 did not sell on Day3 and Day4. I really do appreciate any assistance you can offer. Best regards, Jason jmcguire_online at hotmail . com |
![]() |
| Thread Tools | |
| Display Modes | |
| |