dbTalk Databases Forums  

Problem with empty calculated measure

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Problem with empty calculated measure in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
aaapaul
 
Posts: n/a

Default Problem with empty calculated measure - 03-14-2006 , 04:04 AM






Hello !

I have a calculated measure "Ordercount":

count(
filter(
descendants([PCenter].currentmember,[Aufnr]),Measures.[Stueck] <> 0)
)

My probem is, that the measure is displayed for each level.

This was my result before:
Profitcenter - Pieces
AT - 200.000
DO - 300.000

This is my result now:
Profitcenter - Pieces - Ordercount
AT - 200.000 - 25
KT - emtpy - 0
DO - 300.000 - 12

Can I change the calculated measure so, that it is only displayed when
its <> 0 ?

Thanks
aaapaul


Reply With Quote
  #2  
Old   
Vladimir Chtepa
 
Posts: n/a

Default Re: Problem with empty calculated measure - 03-14-2006 , 08:21 AM






Moin,

Ja, klar, kannst du

1. Variante. Setze nonempty_behaviour für dein CM (ist die schnellste)

2. Variante. Shreibe dein CM so um.

iif(IsEmpty(Measures.[Stueck]), null,
count(filter(descendants([PCenter].currentmember,[Aufnr]),Measures.[Stueck]
<> 0)))


Vladimir


"aaapaul" <lvpaul (AT) gmx (DOT) net> schrieb im Newsbeitrag
news:1142330682.870532.160830 (AT) e56g2000cwe (DOT) googlegroups.com...
Quote:
Hello !

I have a calculated measure "Ordercount":

count(
filter(
descendants([PCenter].currentmember,[Aufnr]),Measures.[Stueck] <> 0)
)

My probem is, that the measure is displayed for each level.

This was my result before:
Profitcenter - Pieces
AT - 200.000
DO - 300.000

This is my result now:
Profitcenter - Pieces - Ordercount
AT - 200.000 - 25
KT - emtpy - 0
DO - 300.000 - 12

Can I change the calculated measure so, that it is only displayed when
its <> 0 ?

Thanks
aaapaul




Reply With Quote
  #3  
Old   
Steve G
 
Posts: n/a

Default Re: Problem with empty calculated measure - 03-14-2006 , 09:48 AM



If you are trying to process multiple partitions or dimensions in parallel
using .net code which calls AS2K DSO, forget it. DSO is COM, and the code
will serialize in the COM calls even if you create multiple threads from your
own .net code. To do it, you need to create a seperate program (or use the
processpartition.exe utility to do the processing) and then create/launch
multiple processes from your .net code in the background. The .net code can
poll those processes and check when they have completed.

Steve Green




"Vladimir Chtepa" wrote:

Quote:
Moin,

Ja, klar, kannst du

1. Variante. Setze nonempty_behaviour für dein CM (ist die schnellste)

2. Variante. Shreibe dein CM so um.

iif(IsEmpty(Measures.[Stueck]), null,
count(filter(descendants([PCenter].currentmember,[Aufnr]),Measures.[Stueck]
0)))


Vladimir


"aaapaul" <lvpaul (AT) gmx (DOT) net> schrieb im Newsbeitrag
news:1142330682.870532.160830 (AT) e56g2000cwe (DOT) googlegroups.com...
Hello !

I have a calculated measure "Ordercount":

count(
filter(
descendants([PCenter].currentmember,[Aufnr]),Measures.[Stueck] <> 0)
)

My probem is, that the measure is displayed for each level.

This was my result before:
Profitcenter - Pieces
AT - 200.000
DO - 300.000

This is my result now:
Profitcenter - Pieces - Ordercount
AT - 200.000 - 25
KT - emtpy - 0
DO - 300.000 - 12

Can I change the calculated measure so, that it is only displayed when
its <> 0 ?

Thanks
aaapaul





Reply With Quote
  #4  
Old   
Steve G
 
Posts: n/a

Default Re: Problem with empty calculated measure - 03-14-2006 , 09:51 AM



Sry, replied to wrong thread.

"Steve G" wrote:

Quote:
If you are trying to process multiple partitions or dimensions in parallel
using .net code which calls AS2K DSO, forget it. DSO is COM, and the code
will serialize in the COM calls even if you create multiple threads from your
own .net code. To do it, you need to create a seperate program (or use the
processpartition.exe utility to do the processing) and then create/launch
multiple processes from your .net code in the background. The .net code can
poll those processes and check when they have completed.

Steve Green




"Vladimir Chtepa" wrote:

Moin,

Ja, klar, kannst du

1. Variante. Setze nonempty_behaviour für dein CM (ist die schnellste)

2. Variante. Shreibe dein CM so um.

iif(IsEmpty(Measures.[Stueck]), null,
count(filter(descendants([PCenter].currentmember,[Aufnr]),Measures.[Stueck]
0)))


Vladimir


"aaapaul" <lvpaul (AT) gmx (DOT) net> schrieb im Newsbeitrag
news:1142330682.870532.160830 (AT) e56g2000cwe (DOT) googlegroups.com...
Hello !

I have a calculated measure "Ordercount":

count(
filter(
descendants([PCenter].currentmember,[Aufnr]),Measures.[Stueck] <> 0)
)

My probem is, that the measure is displayed for each level.

This was my result before:
Profitcenter - Pieces
AT - 200.000
DO - 300.000

This is my result now:
Profitcenter - Pieces - Ordercount
AT - 200.000 - 25
KT - emtpy - 0
DO - 300.000 - 12

Can I change the calculated measure so, that it is only displayed when
its <> 0 ?

Thanks
aaapaul





Reply With Quote
  #5  
Old   
Deepak Puri
 
Posts: n/a

Default Re: Problem with empty calculated measure - 03-14-2006 , 02:09 PM



"1. Variante. Setze nonempty_behaviour für dein CM (ist die schnellste)"

Just one caution, for AS 2000, is that "Non Empty Behavior" works like a
performance hint - it doesn't guarantee that the CM will be empty, eg:

Quote:
with Member [Measures].[CustCount] as
'Count(Filter(Descendants([Customers].CurrentMember,
[Customers].[Name]), [Measures].[Unit Sales] <> 0))',
NON_EMPTY_BEHAVIOR = '[Measures].[Unit Sales]'
select {[Measures].[Unit Sales], [Measures].[CustCount]} on 0,
Non Empty [Customers].[State Province].Members on 1
from Sales
Quote:
But this type of query seems to work in AS 2005 - don't know if the CM
is guaranteed to be empty, though.


- Deepak

Deepak Puri
Microsoft MVP - SQL Server

*** Sent via Developersdex http://www.developersdex.com ***


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.