Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

MDX help - case expression based on aggregated value

 
   Database Help (Home) -> Data Warehouse RSS
Next:  Aggregate when measure contains a specific value  
Author Message
jack

External


Since: Apr 09, 2008
Posts: 1



(Msg. 1) Posted: Wed Apr 09, 2008 11:29 am
Post subject: MDX help - case expression based on aggregated value
Archived from groups: microsoft>public>sqlserver>olap, others (more info?)

I need to solve the following problem (I'm a newbie on MDX) :

FactTable
Year:int
Type: "A" | "B"
M1:int

How to compute (MDX) the following expression:

based on the current aggregation, IF the sum of M1 > 3 THEN sum of M1
ELSE "NOT PUBLISHABLE"

So for example:
FactTable
Year Type M1 ComputedVal
--------------------------------------------
2000 A 1 "NOT PUBLISHABLE"
2000 B 2 "NOT PUBLISHABLE"

2001 A 1 "NOT PUBLISHABLE"
2001 B 5 5

2002 A 1 "NOT PUBLISHABLE"
2002 B 13 13


If aggregation is by Year, then we want to obtain:

Year Type M1 ComputedVal
--------------------------------------
2000 - 3 "NOT PUBLISHABLE" <--- how to ?
2001 - 6 6
2002 - 14 14


If aggregation is by Type, then we want to obtain:

Year Type M1 ComputeVal
---------------------------------------
- A 3 "NOT PUBLISHABLE" <-- how to ?
- B 20 20

 >> Stay informed about: MDX help - case expression based on aggregated value 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
SQL Scheduled Jobs - Is there a way to monitor schedule jobs and restart the jobs automatically when it faills and if it fails then notify the responsible person, is there a tool to do this ?

Running total with &quot;treshold value&quot; detection..? - Hi, I have to create a query which evalaute, for each year, the employees who reached a particular number of absences and when this value is reached. I have 1 000 000 records in my absence table. my table is like this: DateID, EmployeeID, ActivityID,...

Problem with multiple instant of SQL Server - I have 2 instant of SQL server on the same machine. 1st instant keep most of the static information - Dimensional data 2nd instant keep most of the transaction information. When I try to use the Analysis Services, I have 2 connection, but they can't ..

Near Real time updating of fact table - -what is the best method that to implement the near real time updating of a fact table without affecting all those users who are reading from it? -fact table in question is only 1.8gb in size, 3.1 million rows, expect near real time updating of approx....

Extraction software - Hi, I need an extraction software that needs to be capable of capturing a table (or tables) displayed on the web and converting it to a file as a list of records with comma separated values. The records will be converted to insert commands after the....
   Database Help (Home) -> Data Warehouse All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]