ssas 2008 how to remove total for non hierarchy dimension attributes - ssas

As you can see there is a Total added automatically. The Birth Date and Full Name are not hierarchy attributes. They are both from same dimension. I want to show birth date and full name. How to get rid of the Total?

One way to do this is to Compute a calculated member on your DSV. You can name it for example Birth-Name.
To do this
Open your Data Source View
Right click on the dimension name
New name calculation
Name: Birth-Name
expression: birthday+' '+fullname
Add the new field to your dimension
Preview the cube with the new calced member and money measure
In this way you can view your data and the total of all of them together
There are other ways to do this also, but this is the simplest I could think of. The total cannot be totally removed from the cube, as this is what it's real job is. To make aggregations of data.

Related

SSAS OLAP Cube - Sum measure only works when keys are present

(This is a mock of my actual setup to help me figure out the problem.)
I have one fact table and one dimension table, linked by an id field.
My goal is to make a measure that sums up all "thing_count" (integer) values in my cube.
If the user splits by nothing, it should show the total "thing_count" for all records in the fact table. If it's split by "category_name" from the dimension, it should show the total "thing_count" for each category.
I tried to achieve this by creating a SUM measure in my cube:
It works, but not in the way I intend it to
It always shows (null) unless I drag in the "id" field from the dimension.
Measure only:
Measure and category:
Measure, category, and id:
How can I make the measure show the value without keys needing to be present?
Edit:
For GregGalloway's request (I've edited the names so the screenshots are easier to follow):
One common explanation for this behavior (no aggregation) is that you have inadvertently commented out the CALCULATE; statement in your MDX script in the cube. Please check that statement is still present.

SSAS Dimension attribute as Calculated Measure

I am having some issues trying to implement an average of a dimension attribute.
The basic structure is:
Booking Header Dimension
Fact Table (multiple rows per Booking Header
entry)
On the booking header dimension I have a numerical attribute called Booking Window, and I want to be able to create a calculated measure that averages this value.
We are using SQL Server 2012 standard edition.
Any help would be greatly appreciated.
The best approach would be to create a measure group from the dimension table (in BIDS, go to cube designer, tab "Cube Structure", right-click the cube object in the Measures list, and select "New Measure Group", select your dimension table). BIDS will generate some measures, and you can remove all but two: the one based on your numeric attribute (I will call it "YourSummedAttrib" to have a name to refer to below), and the count measure. The aggregate function for the measure "YourSummedAttrib" will probably be "sum", leave that as it is.
Then, create a calculated measure which divides "YourSummedAttrib" by the count measure, which gives the average. Finally, if you have tested everything, make the two measures "YourSummedAttrib" and the count measure invisible before you give the cube to the users, as they only need to see the average, which is the calculated measure.
You can try this which should give you the average of that attribute across all members.
WITH MEMBER [Measures].[Booking Window Value] AS
[Booking Header].[Booking Window].CURRENTMEMBER.MEMBER_VALUE
MEMBER [Measures].[Avg Booking Window Value] AS
AVG([Booking Header].[Booking Window].[Booking Window].MEMBERS,[Measures].[Booking Window Value])
SELECT
[Measures].[Avg Booking Window Value] ON COLUMNS
FROM
[YourCube]
Hope that helps and apologies for any confusion on my part.
Ash
I tried to use the same idea, but without success. The solution I found was create a view with the calculated average and include a new group of measures.

ssas 2005 calculation between two measure group

I am new to SSAS. E.g.I have a sales measure group, with one measure: amount (aggregate function: sum) . Also another measure group sales 1 with one measure: transactions (aggregate function:DistinctCount). now I need to calculate average amount per transaction, so it should be amount/transactions. How can I do that? Is it calculated member in cube designer - calculation tab?
Just create a calculated measure. To do this, open the "Calculations" tab of the cube editor. Then click on the calculator button in the tool bar, which opens the "Calculated Member" editor. Fill the fields, at least name and expression, possibly format string, associated measure group, and/or display folder as well, and deploy the cube. The expression should be something like
[Measures].[Amount] / [Measures].[Transactions]
You can drag and drop items from the bottom left into the expression if you are unsure about the naming conventions. The slash (for division) of the expression you will have to enter manually.

How to define which join a dimension is using in ssas

I have a sales fact table with two dates: order received and order shipped.
I have a time dimension table in the data source view.
I have defined two relationships between the time dimension table and the sales fact table, one on order received date and order shipped date.
In the Cube definition I have two dimensions defined: one for order date and one for shipping date.
I have time hierarchy defined for both dimensions (the fiscal calendar).
I can't figure out which relationship either of the dimensions are using. It would appear that they are both using the join to order received date. How do I tell SSAS to use the shipping date for one dimension and the order received date for the other.
Thanks, --sw
I would open the Cube source in Visual Studio / BIDS, then open the relevant Cube object and navigate to the Dimension Usage tab.
Then find the intersection of the Dimension (row) and Measure Group (column) and click the Build (...) button for that cell. That will show you which columns are involved and let you select the correct Measure Group column.
When you first add a Dimension to a Cube, SSAS defines these settings using the Data Source View relationships (if any exist).

SSAS Max calculation in cube

I have a dimension list of Product Codes and a measure called ACV in my cube. I need to be able to calculate the maximum ACV value for each product code.
I have got as far as the calculation below but that returns the sum of ACV for all products.
MAX([Products].[Product Code].[Product Code].Members, [Measures].[ACV])
I'd be grateful for input on how to resolve my problem.
Thanks!
If you want the maximum evaluated semiadditively by the grain of your model designed in the data source view, you should add a new measure (based on the same source field as the ACV measure) to your cube add set its AggregationFunction property to Max. More on aggregation functions in SSAS.