Solved

Create case statement in SSAS OLAP design

Posted on 2008-10-10
9
1,322 Views
Last Modified: 2013-11-16
I am trying to build a calculated member for an OLAP cube using Micro Soft Analysis Services.  The attributes hold a boolean value.  Basically I want to create a  case statement which looks at the boolean value in 5 attributes and if the value is true in Attribute1then 'descriptor01', if the value is true in Attribute2 then 'descriptor02'  ... to Attribute5.  The aggregation at the various descriptor levels will always be more than the count of records as a record can have a true boolean value in more than one of the 5 dimensions.
0
Comment
Question by:Mocha_Joe
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
9 Comments
 
LVL 8

Accepted Solution

by:
srnar earned 500 total points
ID: 22693821
You can use a calculated measure that detects values of the attributes and changes its value e.g.

with member Measures.DescriptorMeasure
as
case when left(Customer.[Customer Geography].CURRENTMEMBER.NAME,1)="A"
      then "destriptor01"
      else "destriptorOther"
end
select {[Customer].[Customer Geography].[Postal Code].&[3280]&[Warrnambool].children} on rows,
{Measures.DescriptorMeasure} on columns
from [Adventure Works];
0
 

Author Comment

by:Mocha_Joe
ID: 22964495
Is it possible to add this as a hierarchy to the dimension in the Anaysis services design where it will show in the browser of a cube or if you use excel to view the local cube?  I do not want to write in a query editor in Analysis Services.  I want to add to the .sln a hierarchy that will do this.   I have seen this done with 'Data Beacon'.  Please advise
0
 
LVL 8

Expert Comment

by:srnar
ID: 22964955
Put your CASE logic into the relational layer. Than you can easily set a hierarchy based on a multiple attributes logic. I don't know Data Beacon - do you mean that reporting tool?
0
 

Author Comment

by:Mocha_Joe
ID: 22979439
Yes, Data Beacon the reporting tool.  It builds the mdx behind closed doors.   Do you mean add the CASE logic the Data Source View when you refer to 'relational layer' or do you mean build a hierarchy based on the 5 separate attributes ?
0
 
LVL 8

Expert Comment

by:srnar
ID: 22982734
Yes - the new hierarchy would use that attributes. I prefer the database view but you can use the data source also for case logic implementation.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
This post looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question