SSAS Cube Filter Not Working

Posted on 2009-04-22
Last Modified: 2016-02-12
Hello Experts,
I am a noob to SSAS.  I have inherited a cube that was created by one of our other developers.  Unfortunately, he was let go in a recent round of layoffs.  What is happening is that one of our users wants to filter for a particular order number and then filter on a column called 'Usage' which contains only 3 values - Money, Bonus and Filler.  Bonus and Filler are always zero dollar spots (we sell commercial air time on cable TV channels), so the Average Unit Rate and Net Revenue should be zero.

I have attached a couple of screen shots to show the results from the cube and also a query that I put together that uses the same views that are used in the data source view and joined in the same way as is defined in the cube.  In the query you can see that there are many Bonus spots for line 010 and also that line 098 has a Usage type of Money.  However, the cube displays only one spot from line 010 and for some reason also displays line 098.

Based on the fact that the query seems to show the correct data, I think the problem must have something to do with how the cube is setup.  But as I said, I am a noob to SSAS so I have no idea where to start looking.

Any help is appreciated!
Question by:adlink_la
    LVL 6

    Accepted Solution

    If the user is only interested in usage of "Money" you can modify the DSV so that the only "money" records come in.

    I would think having all the records would be better for analysis, in which case you need a usage dimension.  

    Add a named query to the DSV called perhaps "Usage".  It can just be "SELECT DISTINCT Usage FROM BoardReports_Performance", or if that would be an excessively long running query then somethine like

    SELECT "Money" as Usage, 1 as UsageSortKey
    SELECT "Bonus" as Usage, 2 as UsageSortKey
    SELECT "Filler" as Usage, 3 as UsageSortKey

    Draw a relationship between this table and the fact table on the Usage column so that the arrow is pointing to the Usage Colulmn in your new Usage table.

    In BIDS, create a new dimension based on this table (if this is sounding confusing, there are walkthroughs on MSDN).  Bring both columns in as dimension attributes making sure that "Usage" is the key.  Set the UsageSortKey to visible = false.  For the attribute "Usage", the "Usage" column will be both the Member Name and Member Key, and you can set the sorting for the "Usage" attribute to sort by Attribute Key and then point use the UsageSortKey.

    Add this dimension to the cube, and double check that the "Dimension Usage" (too many usages!) shows the relationship between your fact Measure group (fact table) and the new dimension is set to a regular relationship on the column "Usage".

    Reprocess your cube.  Then in Excel, you can use the usage tab either in your rows or columns or as a filter.
    LVL 5

    Author Closing Comment


    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Join & Write a Comment

    This article explains all about SQL Server Piecemeal Restore with examples in step by step manner.
    This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
    Video by: Steve
    Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
    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…

    745 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

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now