Question

How can I make my OLAP exectute faster?

Asked by: gosi75

I'm having big difficulties with an existing OLAP where the end user uses Excel to pivot the data. The OLAP has 6 dimensions where  5 of the dimension have from 34 to 2266 rows and the last dimension, has around 275.000 rows. The fact table has about 165.000  rows and around 2.500 rows are added each month.

The OLAP has few calculated members, some YTD and MAT calculations. Those measures are the most important for the client, along with attributes from most of the dimensions. When attributes from the  biggest dimension, the one with 275.000 rows are added to pivot table, it can take up to few hours to execute.

I just recently heard about the non_empty_behavior function and added that to the members, and a query that before took around 3-5 hours took only few seconds. Later, I found out that there are a lot of data missing. There are few things I think is a bit odd about this, and that is probably because I don't fully understand the behaviour of the non_empty_behavior, but when I do add the non_empty to my calculated member in SSAS f.exs. [MAT - Number Of Packages], I get the correct sum value for, but in the detail view it's missing. In the attached files(September_incorrect.pdf), there is 2.060 in grand total but the detail view only show the one for september, 496 units.
How come the grand total is showing when the detail data are missing?

What are my alternatives here, is there any other function I could add to my calculated measures in SSAS in order to speed up the exectution time without missing any data?

SELECT {
		[Measures].[Number Of Packages Sold],
		[Measures].[MAT - Number Of Packages Sold],
		[Measures].[Year to date - Number Of Packages Sold]} DIMENSION PROPERTIES PARENT_UNIQUE_NAME ON COLUMNS , 
NON EMPTY CrossJoin(
					Hierarchize({DrilldownLevel({[Product].[Product Information - By Name].[All]})}), 
					Hierarchize({DrilldownLevel({[Product].[Strength - number].[All]})})) DIMENSION PROPERTIES PARENT_UNIQUE_NAME ON ROWS 
FROM (
		SELECT ({[Product].[Product Information - By Name].&[Product A - 141945 - 0,18 - mg - 100 - stk], 
				 [Product].[Product Information - By Name].&[Product B - 141945 - 0,17999999 - mg - 100 - stk]}) ON COLUMNS  
		FROM [MDIA])
WHERE ([Dates].[Date hierarchy].[Year].&[2009].&[3. quarter].&[2009 - September]) CELL PROPERTIES VALUE, FORMAT_STRING, LANGUAGE, BACK_COLOR, FORE_COLOR, FONT_FLAGS
 
 
--This is example of one of my calculated member from SSAS 
CREATE MEMBER CURRENTCUBE.[Measures].[MAT - Number Of Packages Sold]
 AS AGGREGATE(LastPeriods(12,[Dates].[Date hierarchy].currentmember),[Measures].[Number Of Packages Sold]), 
/*NON_EMPTY_BEHAVIOR = { [Number Of Packages Sold]}, */
VISIBLE = 1  ;

                                  
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:

Select allOpen in new window

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-10-15 at 07:44:08ID24815014
Tags

OLAP

,

MDX

,

EXCEL 2007

,

SSAS 2008

Topics

OLAP

,

SQL Server 2008

Participating Experts
2
Points
500
Comments
11

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. OLAP Question
    I have excel linked to an olap cube that has various dimensions and three related measures -- actual, budget and variance. In MS OLAP I can see the three measures side-by-side as I drill. In Excel, using a pivot, I can't seem to get the same funcitonality. I can see them one ...
  2. Pivot Table displaying #N/A for OLAP cube data
    I'm not sure if this belongs here or in the SQL forum, but here it goes. I've got a pivot table in Excel based upon an OLAP cube in Sql where the data results are returning as #N/A instead of a value. It is not displaying for all records within the pivot table. The tables/d...
  3. Faster Solution than Pivot Tables?
    Hi experts, I have a monitoring tool for my job. Basically, I get a bunch of text files every month that are processed using vb.net and uploaded to a SQL server. The user then uses an Excel report (previously created) that consumes this data using a pivot table. It works v...
  4. Excel Pivot Chart Grand Total Line
    I have a pivot chart that is formatted as a line chart. I have it setup properly and it looks great. How do I get the grand total line included on the chart? I have not found a way to do this and I need it.
  5. How do i make OLAP cubes run faster / optimisation in VB…
    I'm using pivot table from OLAP server. when i update current page / field, its takes a lot of time to update from one to another (sometimes 8 minutes..) and i want them to run faster (its automatic proccess) i'll be glad to hear solutions Boaz

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: agandauPosted on 2009-10-15 at 13:35:17ID: 25584613

Just to be clear, what do you expect the result set to look like?  Should the 496's be 2060's?  

Also, are any of these dimensions parent/child?

I'm trying to recreate the issue on my end.

 

by: gosi75Posted on 2009-10-15 at 16:07:41ID: 25585754

There should be 2 rows in the result set, one with 496 and other one should have 1.564( the total for the last 11 month), total of 2060.
But the 1.564 is missing as I did add non_empty_behavior to the [MAT - number of packages sold] calculated member, but still I´m able to see the total of 2.060, which is the correct amount for the MAT - Number of packages sold in that month, I think that is a bit odd but on the other hand I don't fully understand the behavior of the non_empty_behavior.

And, none of these dimension are parent/child.

 

by: srnarPosted on 2009-10-16 at 04:36:50ID: 25588507

Non_empty_behavior is usually easy to understand. When the basic measure is empty the calculated is empty also. Also note that there can be more than one basic measure quoted.

I have sometimes problem with the aggregate function which is used in your case. Try to replace with SUM function.

 

by: gosi75Posted on 2009-10-16 at 06:18:24ID: 25589185

I tried to replace it with the SUM function but that did not make any difference.

About the date hierarchy agandau you posted in my other post, I think that could be something wrong with how the date is set up, I enclose a screenshot of my Attritute relationship for the date dimension from SSAS. Do you spot any serious fault how it's set up?

 

by: agandauPosted on 2009-10-19 at 13:51:56ID: 25608907

Yes, I'd change that so that the quarters and years are *not* directly related to the date, but instead are related through the hierarchical structure.  

I'm not familiar with how all that looks in 2008 -- a bit different than what I'm used to.

Attached is how I suspect it would look when set up properly.  When the attribute relationships are good, then the aggregations will be more fully taken advantage of, because the design will then "know" that all the months add up reliably to quarters and quarters to years, etc.

 

by: agandauPosted on 2009-10-19 at 14:48:42ID: 25609347

Also, read this:

http://sqlblog.com/blogs/mosha/archive/2006/10/25/time-calculations-in-udm-parallel-period.aspx

Not all of it is entirely relevant to your specific question, but all of it certainly is worthwhile reading and learning.  It may trigger some design considerations for your date dimension and your measures.

Hope this helps.

 

by: gosi75Posted on 2009-10-19 at 15:49:21ID: 25609657

I can't actually change all of the the attribute relationships, I can make Day --> Month Name - Year --> Quarter but when I try to connect Quarter to Year I get this error:
"The member count of the related attribute, 'Year', is greater than the member count of the source attribute, 'Quarter'.

You also wrote in the jpg you attached, that you presume that each of these attributes are 'fully qualified' date members. I think some of them are not, but I'm not quite sure which of them are not fully qualified. I attach a pdf with the date members, would be great if you could look at it and let me know which of them you would consider not fully qualified date members.

 

by: agandauPosted on 2009-10-19 at 21:25:24ID: 25611058

Your "year" and your "month name year" are more like what you're looking for.

What I mean by fully qualified is that the actual values that become the members of the lower levels of the hierarchy belong to one and only one of the members higher up.

I.e. rather than having quarters Q1, Q2, Q3, Q4, they have to be Q1 2009, or Q1 2008.  Each of these belongs to one and only one year, while something called simply "Q1" belongs to every year.

So this way you end up with more quarters than you have years, which is what the designer was barking about with the terse error message.  It wants a tree, and you want to give it a tree, but the members need to be unique.

I've attached an excel spreadsheet (no macros within) that can help you generate a date dimension.  It's tailored for use within analysis services.  One tab has a create table sql statement, and the other has rows in it that contain my preferred dimension table design.  The last column reads all the values in the table and generates sql INSERT statements so it's pretty easy to "cook" into SQL.



 

by: gosi75Posted on 2009-10-22 at 05:19:32ID: 25633194

I've been fighting to get this to work as you suggested, I've now altered the attribute so that they would be considered as a fully quilafied members. When I deploy the OLAP, I get this error:
"The member '&[3. quarter]' was not found in the cube when the string, [Dates].[Date hierarchy].[Year].&[2009].&[3. quarter].&[2009 - September], was parsed."

I've changed the Named Calculation in the Data Source View so that instead of 1.quarter, 2.quarter for Quarter named calculation, I get Q1 'year', Q2 'year', etc.
Do I need to alter it somewhere else, I have looked and looked and I just don't understand why it's still trying to parse [Dates].[Date hierarchy].[Year].&[2009].&[3. quarter].&[2009 - September] ?

 

by: agandauPosted on 2009-10-22 at 13:29:27ID: 25638634

in the dimension designer, when you have one of the attributes selected look at its properties.  Are you sure they're pulling from the columns in the DSV that you think they are?

Obviously you won't match the names I have in my picture necessarily, I'm just including the pic so there's no confusion about one of the places you need to check.


 

by: gosi75Posted on 2009-10-27 at 08:39:53ID: 31641657

I got this finally to work and it's amazing how fast it's running now. Thanks for the big help and your patience.  Thanks again, cheers
gosi

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...