Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Create case statement in SSAS OLAP design

Posted on 2008-10-10
9
Medium Priority
?
1,327 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 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Recently I was talking with Tim Sharp, one of my colleagues from our Technical Account Manager team about MongoDB’s scalability. While doing some quick training with some of the Percona team, Tim brought something to my attention...
This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
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…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

609 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