Standard Deviation function Analysis services | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Standard Deviation function Analysis services

Hi,
Can anyone please suggest me how to write the standard deviation(stdev) function in MDX . I am stucked into that very badly. The function requires one dimension and one measure . I am using Time dimension in dimension parameter and ‘Depositors’ as a measure. when I run this in browser it gives the same value througout the time values.
I need it very urgently . Dhaval
You can use stdev function which takes a SET and numeric expression.
It Returns the sample standard deviation of a numeric expression evaluated over the set,.
Hi, Ranjit
Thanks a lot for your Quick reply. Sorry forgot to mension that i have already tried this formula in MDX hundreds of time. But not gettig the correct value . I m using the formula in this way. Stddev ( Crossjoin( {[Time].[Time_Key].ALLMEMBERS},{[Measures].[Deposit Amount – Transaction]}) ) I used time dimension as a Set and Deposit amount as a measure which is field of one fact table. The structure of this table is Time_Key intUnchecked (Key)
User_Key intUnchecked (Key)
Tracking_Code_KeyintUnchecked (Key)
Marketing_Agent_KeyintUnchecked (Key)
Local_Campaign_KeyintUnchecked (Key)
Global_Campaign_KeyintUnchecked (Key)
Channel_Key intUnchecked (Key)
Transaction_ID bigintUnchecked
Deposit_Amountdecimal(18, 4)Unchecked
Now I dont know whether i have to include all the key columns to get the correct value. I tried lots of ways but didnt get the sucess . I need the help urgently. Please help me. Dhaval
May check
http://www.sqlservercentral.com/columnists/khenry/introductiontomdx.asp
http://mondrian.sourceforge.net/mdx.html
http://www.dayser.com/aggregate_function_in_cube_editor_0000088671.htm
links for any help./ Satya SKJ
Contributing Editor & Forums Moderator
http://www.SQL-Server-Performance.Com
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
]]>