I was recently asked by a SSAS developer about how to set up a role-playing dimension so I did a brief demo to show how to set it up. In this post, I am document the steps to help you get started:
What is role-playing dimension?
What if you want to see sales data by Order Date as well as Shipped Date? You can one date dimension that is used more than once for seeing sales data by order date and shipped date. In this case, date dimension becomes a Role Playing Dimension.
1. Open SQL Server Data Tools and SSAS project that you are working on.
2. Go to Data Source Views from the solution explorer.
3. Make sure that the relationships are specified between dimension (e.g. date dimension) and Fact Table (e.g. Fact Sales). Example: If you’ve OrderDateSK and ShippedDateSK in your fact table, then establish a relationship between the both columns with the Primary Key of the Date dimension.
Note: If you do not have the relationships specified in the data source views, there’s an alternative to go to dimension usage for a cube and setup role playing dimensions. since this is targeted to get you started, I am not covering the steps for that.
4. Now go to the Dimensions section in the solution explorer and add a Dimension that uses the existing data source view from step #3.
5. switch to Cubes.
Now, if you don’t have a cube created yet then you can use the cube wizard if you want and as long as you have the relationships specified at DSV’s, it should create a role-playing dimension.
Alternatively, you can also create a new dimension. In the Design pane, lower left section, you’ll see dimensions.
select your dimension that you created in step #4 that’s a role-playing dimension from the list and click on OK. And it creates a role-playing dimension for you! So all you had to do was to make sure the relationships are created between the fact and (role-playing) dimension table and SSAS does the rest of the work for you
Note: for the demo I didin’t rename the dimension attributes but you do all that good stuff too when you are building the cube for users!
In this post you got started on how to add a role-playing dimension in a SSAS cube.
I helped a user today to sort measure values in his excel based ad-hoc report using SSAS cubes & so I’m posting the tips here for note-keeping. There are two ways to do this & here they are:
#1: Select a cell that has a measure value > Right click > Sort > sort the values in ascending or descending from here:
#2: Alternatively, you can also do the same thing by: Select a value from the filed that needs sorting > go to Home Tab > Sort & Filter > from here you should be able to sort data in ascending for descending order:
In this post, I shared two ways you can sort the measure values in an excel based ad-hoc report using SSAS cubes. Do you allow excel based ad-hoc reporting over SSAS cubes in your organization?
In this blog post, we’ll see steps to Parametrize a SQL Server Reporting Services report where data source is Analysis services (SSAS) cube:
Step 1: Let’s say you have reached to a point with your SSRS report where you’ve configured your data source, data sets and data fields that you want to use for your report. For the purpose of this blog post, I’ll be starting with a SSRS report that shows Sales VS country names:
Step 2: Now, let’s say the requirement are such that you want to parametrize the report by a data field in the Analysis services cube: continents
Step 3: Switch to Design View. Now navigate to query designer: Select your Data-set > Right Click > DataSet Properties > Query > Query Designer
Step 4: Drag the field to the filter area. For the purpose of this blog post, I am going to select Continent Name and add it to Filter area.
To add a field to filter area, there are two options:
#1: Select the field > Right click > Add to Filter
#2: Select the field > use your mouse to drag it to filter area
Step 5: Once you’ve added your desired field to the filter area, we’ll have to add it as parameter.
Now chances are that you are not seeing the parameter check box for this field because the dialog box is minimized. You can either maximize the dialog box or scroll to the right side of the filter area.
Once you see it, check it > click ok
Step 6: Once you’re back on Design View. Try “preview” report. you should be able to see the option to select parameter value before the report gets populated with data:
I selected Europe and then clicked on view report:
Step 7: One last thing, Let me also point out how you can change the properties of the parameters.
Go Back to design view > from the report data pane > Expand parameters folders > select the parameter > Parameter Properties
I’ll leave you with exploring what you can do with parameter properties! And with that I conclude this blog post, Your comments are very welcome!
In this blog post, we’ll see a step by step guide to install Data Mining Excel add-in in excel that would help you carry out data mining in Excel.For the purpose of this blog-post, I am going to install add-in for Excel 2010 and SQL Server Analysis services server 2012.
It’s important to note that this add-in acts as an interface between Excel and “SQL Server Analysis services (SSAS)”. So SSAS is the place where data mining wizardry takes place and EXCEL acts as a client.
Here are the steps:
1) Search for “Microsoft SQL Server 2012 Data Mining add-ins for Microsoft office 2010”. AND Download the add-in.
2) Run the Setup > To go forward you have to accept license agreement.
3) Select “Data Mining for Excel” as a feature that’s supposed to be installed:
4) Next > Install.
After it is successfully installed, open Excel.
5) Now in EXCEL 2010, can you see the Data Mining Tab?
6) There’s more. You’re not done yet.
Did you see a “Getting started” dialog box too. If not, click on “getting started” from the Start Menu:
7) Now, if you have SSAS – then select “Use an Existing Instance of Microsoft SQL Server 2008 or later analysis server that I administer ”
But if you do NOT have SSAS, then you could consider installing the Evaluation copy.
For this blog-post, we’ll go with the first option:
8) Now, can you see the instructions? They read like this:
You have chosen to download the Microsoft SQL Server 2012 Enterprise Evaluation Edition.
The Microsoft SQL Server 2012 Enterprise Evaluation Edition is fully-functional 180-day trial software.
Microsoft SQL Server 2012 is a data management and analysis solution that enables companies of all sizes to gain greater insight from their business information, apply that insight to enhance their decision-making process, and achieve faster business results for a competitive advantage.
You now have 2 more steps to complete to start using the Microsoft SQL Server 2012 Data Mining Add-ins for Office.
Step 1. Download the Microsoft SQL Server 2012 Enterprise Evaluation Edition The typical evaluation installation of SQL Server 2012 does not include the Analysis Services part of the product by default. When installing Microsoft SQL Server 2012, you must install Analysis Services.
Step 2. Configure SQL Server 2008 (or later) Analysis Services so that the Microsoft SQL Server 2012 Data Mining Add-ins for Office will work correctly You can now run the SQL Server 2012 Data Mining Add-ins for Office Configuration Utility that is part of the installation. This tool will do everything for you in order to get your SQL Server 2008 (or later) Analysis Services instance configured correctly for use with the Microsoft SQL Server 2012 Data Mining Add-ins for Office.
Click the link below to run the application that will allow you to configure SQL Server 2012: C:Program Files (x86)Microsoft SQL Server 2012 DM Add-InsMicrosoft.SqlServer.DataMining.Office.ServerConfiguration.exe
Once you have completed Steps 1 and 2, click the Finish button below.
Let’s follow the above steps:
9) Download SQL Server Enterprise Evaluation copy for yourselves.
10) After Downloading the copy – run the SQL Server Setup. These are the steps to install a SSAS:
step a – e
a. Installation > New SQL Server Stand-alone installation or add features to existing installation
b. Run Setup support rules > Ok.
c. In the “Specify a free edition”, select “Evaluation” > Next
d. To go forward, you’ll have to accept the terms.
e. Now, you’ll see the SQL Server setup. These are my screenshots while I installed the evaluation copy on my machine – refer to them while you are installing:
Note: I am installing it on my Demo Machine, This is NOT how it’s done in Enterprises. The goal of our demo machine is to get acquainted with the Data Mining features in Microsoft SQL Server.
Here are the screenshots
Click on Select All features. And I unchecked “Distributed replay controller” and “Display replay client”.
One of the task while building a PowerPivot Model is to create/Edit/Delete Relationships between tables. With SQL Server 2012 release of PowerPivot for Excel, we now have a Diagram view and this makes our task of defining relationships easier! Great addition. Any-who when you view your model in Diagram Model, This is how it looks:
To Edit a Relationship, You can click on the Relationship represented by the arrow and it would pop up an “Edit Relationship” Dialog Box.
But what if you wanted to Manage ALL relationships of this Model? You can do this!
GO TO Design Tab > Click On Manage Relationships.
Now here you can manage (create/edit/delete) relationships among tables. Very easy!
That’s about it for this post. Your feedback is welcome!
I got a chance to play with power-view which seems like great feature of SQL Server 2012! And I liked it that we can create Hans Rosling styled BI dashboard’s with Powerview. For those who do not know about Hans Rosling presentations, check these collection: All Hans Roslings Ted Videos.
And by studying modules in SQL server Training kit 2012, I was able to create a similar Dashboard, It was fun!
Now, Listing resources for you, If you are Interested to learn about Powerview: