![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
From: "Bill Hays" <bhays (AT) comtime (DOT) com Subject: STDEV aggregate from fact table Date: Tue, 14 Dec 2004 16:13:04 -0500 Lines: 14 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Message-ID: <eAcFDHi4EHA.1260 (AT) TK2MSFTNGP12 (DOT) phx.gbl Newsgroups: microsoft.public.sqlserver.olap NNTP-Posting-Host: proxy2.comtime.com 68.75.195.7 Path: cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGP12 |
|
Xref: cpmsftngxa10.phx.gbl microsoft.public.sqlserver.olap:55805 X-Tomcat-NG: microsoft.public.sqlserver.olap I am designing a quality control cube where I need to compute the standard dev from the fact table information. The only way I have found to do this is to precompute X^2 (so that I can roll up the squares of the measurements) then I use a calculated member stdev. Is there a better way to perform this type of computation with AS? My main concern is that I am required to double the columns (measurement then measurement squared) in the fact table. Thanks (in advance!) Bill |
#3
| |||
| |||
|
|
Hello Bill, I am not quite sure about how you want to calculate stdev. Will you describe it in more details: Assuming that you always wish to calculate the standard deviation of measure1 for all the leaf nodes under a selected member of the [dimension1] dimension: Stdev(Descendants([demension1].CurrentMember,,LEAVES), [Measures].[measure1]) Have a great day! Thanks & Regards, Peter Yang MCSE2000, MCSA, MCDBA Microsoft Partner Online Support Get Secure! - www.microsoft.com/security ================================================== === When responding to posts, please "Reply to Group" via your newsreader so that others may learn and benefit from your issue. ================================================== === This posting is provided "AS IS" with no warranties, and confers no rights. -------------------- | From: "Bill Hays" <bhays (AT) comtime (DOT) com | Subject: STDEV aggregate from fact table | Date: Tue, 14 Dec 2004 16:13:04 -0500 | Lines: 14 | X-Priority: 3 | X-MSMail-Priority: Normal | X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 | Message-ID: <eAcFDHi4EHA.1260 (AT) TK2MSFTNGP12 (DOT) phx.gbl | Newsgroups: microsoft.public.sqlserver.olap | NNTP-Posting-Host: proxy2.comtime.com 68.75.195.7 | Path: cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGP12 phx.gbl | Xref: cpmsftngxa10.phx.gbl microsoft.public.sqlserver.olap:55805 | X-Tomcat-NG: microsoft.public.sqlserver.olap | | I am designing a quality control cube where I need to compute the standard | dev from the fact table information. The only way I have found to do this | is to precompute X^2 (so that I can roll up the squares of the measurements) | then I use a calculated member stdev. | | Is there a better way to perform this type of computation with AS? My main | concern is that I am required to double the columns (measurement then | measurement squared) in the fact table. | | Thanks (in advance!) | | Bill | | | |
#4
| |||
| |||
|
|
From: "Bill Hays" <bhays (AT) comtime (DOT) com References: <eAcFDHi4EHA.1260 (AT) TK2MSFTNGP12 (DOT) phx.gbl 6aH3kUm4EHA.3512 (AT) cpmsftngxa10 (DOT) phx.gbl Subject: Re: STDEV aggregate from fact table Date: Wed, 15 Dec 2004 10:28:25 -0500 Lines: 97 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Original Message-ID: <eaHrPrr4EHA.1292 (AT) TK2MSFTNGP10 (DOT) phx.gbl Newsgroups: microsoft.public.sqlserver.olap NNTP-Posting-Host: 65.185.80.189 Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGP10 |
|
Xref: cpmsftngxa10.phx.gbl microsoft.public.sqlserver.olap:55844 X-Tomcat-NG: microsoft.public.sqlserver.olap Thanks for the response! This is a tricky issue, takes a moment for me to wrap my mind around the issue also. My problem, (I am almost sure there isn't an AS solution now) is that I am trying to calculate the standard deviation from the facts, not from the leaves. In many data collection areas there are just too many fact records, for example 100k/day. I would prefer to aggregate these into useful blocks of 1 hour of production/product/machine. But in doing so, I loose the ability to compute the Stdev back down to the fact table. Once the data is SUMed with the Aggregate function, the information is lost. I could make each fact it's own leaf, as you suggest, but 100k leaves would take some time to compute the stdev for just a single day of production. (over a couple of months or a year this looks really ugly) Looks like the best solution is still to pre-compute the squares of my measures and then create a calculated member for the StDev using the rollup sum of the measures and measures squared. Bill "Peter Yang [MSFT]" <petery (AT) online (DOT) microsoft.com> wrote in message news:6aH3kUm4EHA.3512 (AT) cpmsftngxa10 (DOT) phx.gbl... Hello Bill, I am not quite sure about how you want to calculate stdev. Will you describe it in more details: Assuming that you always wish to calculate the standard deviation of measure1 for all the leaf nodes under a selected member of the [dimension1] dimension: Stdev(Descendants([demension1].CurrentMember,,LEAVES), [Measures].[measure1]) Have a great day! Thanks & Regards, Peter Yang MCSE2000, MCSA, MCDBA Microsoft Partner Online Support Get Secure! - www.microsoft.com/security ================================================== === When responding to posts, please "Reply to Group" via your newsreader so that others may learn and benefit from your issue. ================================================== === This posting is provided "AS IS" with no warranties, and confers no rights. -------------------- | From: "Bill Hays" <bhays (AT) comtime (DOT) com | Subject: STDEV aggregate from fact table | Date: Tue, 14 Dec 2004 16:13:04 -0500 | Lines: 14 | X-Priority: 3 | X-MSMail-Priority: Normal | X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 | Message-ID: <eAcFDHi4EHA.1260 (AT) TK2MSFTNGP12 (DOT) phx.gbl | Newsgroups: microsoft.public.sqlserver.olap | NNTP-Posting-Host: proxy2.comtime.com 68.75.195.7 | Path: cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGP12 phx.gbl | Xref: cpmsftngxa10.phx.gbl microsoft.public.sqlserver.olap:55805 | X-Tomcat-NG: microsoft.public.sqlserver.olap | | I am designing a quality control cube where I need to compute the standard | dev from the fact table information. The only way I have found to do this | is to precompute X^2 (so that I can roll up the squares of the measurements) | then I use a calculated member stdev. | | Is there a better way to perform this type of computation with AS? My main | concern is that I am required to double the columns (measurement then | measurement squared) in the fact table. | | Thanks (in advance!) | | Bill | | | |
#5
| |||
| |||
|
|
Looks like the best solution is still to pre-compute the squares of my measures and then create a calculated member for the StDev using the rollup sum of the measures and measures squared. My main concern is that I am required to double the columns (measurement then measurement squared) in the fact table. |
#6
| |||
| |||
|
|
Looks like the best solution is still to pre-compute the squares of my measures and then create a calculated member for the StDev using the rollup sum of the measures and measures squared. My main concern is that I am required to double the columns (measurement then measurement squared) in the fact table. You've likely already thought of this: instead of storing pre-calculated X^2 values in your fact table, you can of course use a calculated column in your database, so it won't take up any extra storage space, instead X^2 is calculated on the fly by your database. Cheers/K |
#7
| |||
| |||
|
|
From: "Bill Hays" <bhays (AT) comtime (DOT) com References: <eAcFDHi4EHA.1260 (AT) TK2MSFTNGP12 (DOT) phx.gbl 6aH3kUm4EHA.3512 (AT) cpmsftngxa10 (DOT) phx.gbl |
|
Subject: Re: STDEV aggregate from fact table Date: Mon, 20 Dec 2004 13:42:36 -0500 Lines: 31 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Message-ID: <OUip#Os5EHA.2568 (AT) TK2MSFTNGP11 (DOT) phx.gbl Newsgroups: microsoft.public.sqlserver.olap NNTP-Posting-Host: proxy2.comtime.com 68.75.195.7 Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGP11 |
|
Xref: cpmsftngxa10.phx.gbl microsoft.public.sqlserver.olap:55960 X-Tomcat-NG: microsoft.public.sqlserver.olap Yes, once I figured out the pre-squaring, I changed my fact table over to a view and added columns with squares, which seemed to work out very well. Thanks for the suggestion. Bill "willie" <nexus42 (AT) btinternet (DOT) com> wrote in message news:cq6j3o$nhn$1 (AT) sparta (DOT) btinternet.com... Looks like the best solution is still to pre-compute the squares of my measures and then create a calculated member for the StDev using the rollup sum of the measures and measures squared. My main concern is that I am required to double the columns (measurement then measurement squared) in the fact table. You've likely already thought of this: instead of storing pre-calculated X^2 values in your fact table, you can of course use a calculated column in your database, so it won't take up any extra storage space, instead X^2 is calculated on the fly by your database. Cheers/K |
![]() |
| Thread Tools | |
| Display Modes | |
| |