SSAS MDX Calculation to add detail % calculation

Category: visual studio visualiaztion

Question

Ismailc1 on Mon, 31 Aug 2020 19:30:42


Hi,

I have a filter that applies a percentage calculation on lowest level (year > month > week)

the lowest level week calculates correct but my month total rolls up and also calculates with percentage, but i would like it to sum the weekly results

SCOPE ([SOP Measure Dimension].[SOP Measure].&[8]);                                   
  this=  iif(Instr([Date Dimension].[Date SOP Structure].CurrentMember.Member_Key,"M-",1) >= 1   --IIF(Instr([Date Dimension].[Date SOP Month].CurrentMember.Name,"-",1) = 0   --WILDCARD NOT LIKE NOT FOUND
        ,([SOP Measure Dimension].[SOP Measure].&[8],[Measures].[SOP Value])
        ,(iif(([SOP Measure Dimension].[SOP Measure].&[8],[Measures].[SOP Value])=0 
           or ([SOP Measure Dimension].[SOP Measure].&[8],[Measures].[SOP Value]) is null
           ,0
          ,(([SOP Measure Dimension].[SOP Measure].&[8],[Measures].[SOP Value]) * 
           (([SOP Measure Dimension].[SOP Measure].&[21],[Measures].[SOP Value])+([SOP Measure Dimension].[SOP Measure].&[20],[Measures].[SOP Value]))))));
  FORMAT_STRING(This) = "#,##0";
END SCOPE; 

 

Anything im doing wrong?

Regards