I'm pretty new to SSAS and i have encountered a quite odd issue. The simple SUM function in OLAP cube shows wrong numbers based on the dimension usage.
I have created simple OLAP cube in SSAS, which tracks fuel payments across company car fleet. Data source is a SQL database server, and I use table "purchase" (contains information of amount of fuel bought, paid price, location of purchase etc.) as a measure and tables "car" (information about car type, its registration ID etc.), "location" (plant location the driver originates from) and "division" as dimensions.
When I first connected all dimensions to the measure on the "Dimension usage" tab, I got wrong sum of the price paid and amount of fuel bought - the sum displayed was much lower than the actual one. I tried to look into it and the numbers were wrong as well if i looked at the data by division, location etc.
But when I used the "Car" dimension and created table showing the data for each individual car, the results were correct, which I find weird.
When I disconnected the "Car" dimension from the measure group, the totals in the cube were correct, but i was (of course) unable to look at individual numbers for each car.
I understand that there is some problem with the "Car" dimension, but I am unable to find out what exactly goes wrong. Any advice helping me to identify where to look would be much appreciated. Thanks in advance.
Related
I'am new on SSAS cube and i want to find the source table name of a mesure .
I cheked on properties but find nothing;enter image description here
How can I do to find the table that provide this mesure with data please .
Thanks for help
Based on your screen shot:
Cash Register Discrepancy Amount is the measure you are looking for
Cash Register Discrepancy Amount Local is the underlying measure
Now, you need to look for the source of the underlying measure, i.e., Cash Register Discrepancy Amount Local
Using the Adventure Works sample, the Measure Internet Gross Profit uses 2 underlying measures Internet Sales Amount and Internet Total Product Cost.
So, now we will search of this measure, first in Calculation, then in the Cube Structure. We can see the measure under the "Internet Sales", we can now go to the Properties to find the underlying table and column.
Good luck
I have built a small data warehouse using the Adventure works database. I have deployed it to SQL Studio Manager. I have written my first MDX query
select
customer.[full name].members on rows,
order (measures.[sales amount],asc) on columns
from [Adventure Works DW2012]
Please see the screenshot below:
I understand that the top level of the hierarchy are dimensions i.e. Customer, Date, Due Date, Interne Sales, Order Date, Product and Ship Date. I understand that dimensions have attributes. For example: Model Name, Product Line, Product Name are attributes of the Product dimension and Product Model Lines is a hierarchy of the Product dimension.
What is meant by: Financial; History and Stocking?
You've come up against something I think is a genuinely confusing and ill-designed aspect of SSAS.
You're correct that Model Name, Product Line and Product Name are attributes of the Product dimension. But what you're seeing here (in your screenshot) is hierarchies called Model Name, Product Line and Product Name.
These are not "hierarchies" in the sense that most people use the term (a structure with more than one level). They're the "attribute hierarchies" based on the attributes of the same name. They only have one level two levels. (EDIT: as whytheq pointed out, they have one leaf level, and almost always also have an "All" level).
(EDIT) Product Model Lines is a "real" (aka "user") hierarchy, with multiple levels apart from the All and leaf levels, based on multiple attributes.
Financial, History and Stocking are "folders". They get "created" by the setting of any AttributeHierarchyDisplayFolder property of any Attribute in the Dimension design (or the DisplayFolder property of any "real" hierarchy). They have nothing to do with any dimension structure - they're just for display convenience. Probably necessary because, as becomes clearer the more I try to explain it, the structure of Dimensions in SSAS is really unnecessarily complicated.
You can hide the "attribute hierarchies" from client applications (e.g. Excel) by setting the AttributeHierarchyVisible property of the attribute to False. But they'll still show up in the MDX "helper" screen you're looking at.
I have a SSAS cube that has worked fine for a while. I recently added a new dimension and now all the measures are vastly inflated. For instance, a count that should be about 300,000 for the whole model (i.e. with no filters at all) is now 1,500,000. All the measures I have checked are affected. The measure values are always way too high, but not be any consistent factor (i.e. some are 5 times too big, others 10 or 20 times too big). The errors are present whether or not the new dimension is included in the query.
I went back to a previously working version and tried again, making sure that the only changes I made were:
Add a new table in the dsv
Create a new dimension based on that table and add it to the cube
Define referenced relationships in the dimension usage matrix to link the new dimension to the measures via one of the other existing dimensions
My caution didn't pay off -- the second attempt gave the same result as the first, which points to a conceptual or design problem. Any ideas where I might look for my mistake?
More Details
The cube structure is as follows, with the recently added Church table highlighted:
The cube has many measure groups, but since all seem to be adversely affected by the introduction of this new dimension, I'll focus on just the one labeled "cm". We are a charity organisation that raises money for children in poverty around the world. "cm" represents a financial commitment that a supporter ("con" means "constituent") makes to child in need. Analysing the number of commitments by various con attributes has worked fine for a long time. We can also successfully analyse cm's by attributes in constituent_address via a referenced relationship.
Since most of our constituents belong to a church of some form, we wanted to add church details to the cube (e.g. church name, church size, denomination). We could then, for instance, count the number of commitments made by constituents who belong to Baptist churches. I added the Church table, and modified the con named query to include a church_id. (I also checked that the new con query returns exactly the same number of records as the old one, so I don't think the ensuing problem is caused by the con table changing.)
Here's an extract of the dimension usage matrix:
And here is a before and after example. The first shows the correct count of commitments before the Church dimension was added. The second shows the same measure, built from exactly the same data, with the only changes to the cube being the addition of the Church dim. As you'll see, the new Church dimension is not explicitly included in the query but the measure now shows a commitment count of 1,574,823 rather than 315,057.
--Matt
I can't figure it out! (CustomRollUpColumn??, or some custom made MDX calculated thing)
My problem: I have a dimension TypeOfRow who's function it is to display the ... well yes ... type of row. I'm working in the financial sector and, always, need to provide the ultimate result ==>> The Total Contribution. I read, amongst others, the article of Martin Mason ( http://martinmason.wordpress.com/2012/02/26/the-ssas-financial-cubepart-1ragged-hierarchies/ ) and designed the dimension as a "Naturalized Parent-Child Hierarchy".
The dimension, 5 levels, I designed for this solution is (simplyfied):
•+/+ Revenue (several types of)
•-/- Cost (several types of)
•= Total Contribution
A user requirement is that the "Total Contribution" always display the "Total Contribution" even if any the Revenue- or Cost types are filtered out.
My question: is this possible showing the total of a dimension without showing all the members (in Excel but I hope to configure this in SSAS 2008R2)?
many thanks in advance, - Leon
I have a cube that I built in SSAS for general ledger data. The cube uses 2 fact tables. One for accounts that are "normal" dollar based accounts and the other is for unit / statistical accounts - accounts that count ANYTHING, except for money usually.
I need for one calculated member in SSAS to be ANY of the "normal" dollar based accounts divided by ONLY one particular dimension of the statistical accounts.
If clear as mud - let me give the specific example. There is an statistical account called Gallons (measure is units) and there are many accounts such as sales, depreciation, tax expense, etc that are the "normal" G/L accounts (measure in dollars). I need to have the cube be able to report on ANY of the "normal" G/L accounts DIVIDED by Gallons (so that any of the normal revenue / expense accounts can have a measure that shows BY GALLON.)
I have no clue how to write the MDX to do this (the function to use and / or the syntax) and I have tried many times and researched quite a bit (I am a SQL person - FAR from a MDX person I guess!). I'm thinking I need to use FILTER but I'm not even sure that is the right direction.....
Little unsure with your design ,If you are having trouble with MDX you can create a calculated member in DSV using T-sql