![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello all, greeting from Peru. I have a problem with semiadditive measures in AS 2000. Yes, I read the microsoft webpage MSDN of Semiadditives, and I write my code based on it. I have stock form a product of the month JANUARY, since January 3 from January 29. Here is my first mdx work: Measures.[No void]: =============================== IIf( (IsEmpty(([Measures].[Stock END],[Time].currentmember))), ([Measures].[No void],[Time].currentmember.prevmember), ([Measures].[Stock END],[Time].currentmember) ) Measures.[Closing Value]: ======================== (Measures.[No void], ClosingPeriod([DimFecha].[Day])) The Result: ========== As I have cells of products that not have stock by some days, in the grid the calculated member (No void) goes to the INFINITE, and the meassure closing value have ERROR in its cells. I modified the (No void) MDX sintaxis to have this: Measures.[No void] Number 2: =============================== IIf( (IsEmpty(([Measures].[Stock End],[Time].currentmember))), (IIf( (([Time].currentmember) is (OpeningPeriod([Time].[Day])) ), ( [Measures].[Stock End],[Time].currentmember ), ([Measures].[No void],[Time].currentmember.prevmember)) ), ([Measures].[Stock End],[Time].currentmember) ) The result: Still doesnt make te result form END JANUARY the value of JANUARY 29 (the last value in the row, remember I have values from january since 3 to 29) I want to try to make a comnparisson between TIME.CURRENTMEMBER and openingPeriod of the selection (Comparing the 31 with January the 1st, then 30 vs 1st, 29 vs 1st, and so) but I dont ave this clearly. Finally, this is the last of my MDX for NOVOID MDX LAST ======== CoalesceEmpty( ([Measures].[Stock End], [Time].CurrentMember ) , ( (IIf( (([Time].currentmember) is (OpeningPeriod([Time].[Day])) ), ( null ), ([Measures].[No void],[Time].currentmember.prevmember)) ) ) ) Please, I need some advice with this. MSDN only helped me with the first part of my letter. And his recursively algoritm brings me to the INFINITE. I Realy need help, Thanks a lot, for the time. -- Message posted via http://www.sqlmonster.com |
#3
| |||
| |||
|
| With Member [Measures].[No void] as |
#4
| |||
| |||
|
#5
| |||
| |||
|
#6
| |||
| |||
|
#7
| |||
| |||
|
| ... |
#8
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |