SSAS cube development - ssas

I am developing an SSAS cube for the product I am working on.
I have faced the below problems:
In the product you can build organization unit chart. This organization unit will be used as a dimension in the cube. In my research I found that I can build a cube grammatically using C#. My question is that what is the best approach to build a dynamic dimension.
In the product, we have a role based permission. A user can see data based on his role. How can I implement this feature in the cube? Currently, any body can read all the data from the cube.
Thank you for your help.

Dynamic dimensions are possible in SSAS. You would be able to show the members based on the roles that are desired. This is done using "Dynamic dimension security". You'd be able to write an MDX in the "Dimension data" tab.
http://bidn.com/Blogs/analysis-services-dynamic-security

Related

How to export a documentation from SSAS

I have a tabular model built in Analysis Services and I would like to know if it is possible to export documentation with my data sources, tables, roles, relationships and measures?
Also, I would like to know the best way to document the SSAS Cube. If anyone can send me a sample documentation for me just to use as a base to build my own documentation.
Thanks!
I would start with DAX Studio https://daxstudio.org/, this allows you to run queries on the meta data of the cube (DMV), and get the measure and other information out. Another good tool to use would be Tabular Editor https://tabulareditor.com/.
In DAX studio, you would run a query such as
select * from $system.MDSCHEMA_MEASURES
Which would list the measures, the definition and other metadata about them. You can then query other items to get the relationships, table definitions etc.

Automate SSAS Tabular Model creation via script

I have a data catalog where people can browse through the DWH tables. People can select tables and send a request to the IT team. This is in the form of a table which gives all the table names and column names that a person wants to have.
In the current situation, my team has to manually create a SSAS Tabular Model with the requested tables in Visual Studio: (Create a new model, connect to the DWH, select the requested tables and columns, assign user access and deploy the model on the analysis service.)
My question: is there somebody who knows a way to automate this process? Is it possible to create Tabular Models with scripts automatically? I've come across Tabular Model Scripting Language but I'm unsure from the documentation if it's possible to create NEW tabular models. Seems like it's only possible to script and make changes in already existing models.
Any form of suggestion or guidance will be appreciated, thanks beforehand.
Michael Kovalsky has a great solution for this on GitHub. See https://github.com/m-kovalsky/ModelAutoBuild. You start with an Excel template and then use scripting in the Tabular Editor tool to create the model. It may not have all the elements you need in your models, but it is a great starting point.

data access management in OLAP cube for organization with multiple compaines

I am building a OLAP Cube in SSAS for an organization which has many different companies under its umbrella.
i have built a principal cube which consists of all the measure groups and dimensions, which has the data of all the companies in this organization.
Now this cube is ok for the top level management, but i need to limit the access of users from each of the companies, only to the data of its own company.
Is there a way to do that in the principal cube, without duplicating it to many sub cubes, each consists of only the relevant company?
Thank you in advance,
Tal
You can use role based security in combination cell-based security. below link can be useful:
https://learn.microsoft.com/en-us/sql/analysis-services/multidimensional-models/grant-custom-access-to-cell-data-analysis-services
We solved the problem through the automatic modification of MDX queries, restricting data through nested cubes (subcube) for each organization. Not only data, but also cube metadata were limited. The mechanism of roles to the customer is not suitable, as organizations and users are constantly added.The Ranet UI Pivot table was used in the Saas solution. The library allows you to parse and modify MDX query, as well as filter the metadata of the cube.

Possible to Create OLAP Cube filtered by dimension?

I hope this is a quick yes or no question and I believe the answer is yes, but wanted to confirm with someone more knowledgeable than I.
First the background story: We've just started using OLAP cubes where I work and have one setup each for financial, staffing, and project data (3 cubes) in our new ERP system. We have several offices where this data is needed, but we don't want for them to have access to the other office's data. There are only a few individuals in the organization that have access rights to these 3 online cubes.
For distributing the appropriate set of data for the individual offices, the solution I've currently come up with is to create offline cubes that are connected to pre-configured excel files (using Excel 2013 Standard or Plus). Each offline cube is created via the "CREATE GLOBAL CUBE" MDX command and then is filtered via one of the dimensions (see below).
This solution has not been very effective as these offline cubes use absolute paths in the excel connection files. We've been remotely connecting to the users desktops to reconnect the offline cube that gets distributed to them. This process is not very effective as it seems excel sometimes doesn't want to reconnect to the offline cube and in some instances simply won't work.
The question: Is there a way to create an online cube that has been pre-filtered on a particular dimension so that I can allow access to their online cube for only their data rather than using offline cubes?
I've listed the commands I'm using to create the offline cube below as an example of what I'm looking for.
Cheers
CREATE GLOBAL CUBE
[Offline Cube Name]
STORAGE
'C:\SomeFile.cub'
FROM [Online Cube Name] (
MEASURE [Online Cube Name].[Some Measure 1],
MEASURE [Online Cube Name].[Some Measure 2],
DIMENSION [Online Cube Name].[Dimension].[Office Name]
(
LEVEL [Organization],
MEMBER [Organization].&[Office Name]
)
);
If you have been completely successful with local cubes count yourself lucky as they are tricky. But I would recommend you avoid them.
Instead setup role-based security in the cube and let users connect live. If you have a list of Active Directory users or groups per office and want to create one role in SSAS per office follow this approach. If you prefer to add a few hidden tables to the cube that drive security then use the dynamic security approach.

SSAS cube Deployment

I was trying my hands on building Cubes using AdventureWorksOlap database. I successfully build what I was trying to do. Now my concern is that I want to deploy the cube to a server so that rest of the team members can use this cube as a datasource while generating their SSRS reports (might be some other tools).
I have heard that SSAS does not allows Sql Authentication. So,
1) how will the members access the cube?
2) What authentication changes do I need to incorporate?
3) How can the other developer using his computer's SSMS access the cube and make changes to it (just like we can do it in the OLTP database)?
4) I need to prepare a dashboard using this cube. Any suggestions on this one.
Thanks in advance.
1) Windows Authentication
2) none.
3) Once the cube is deployed you cant change it. Actually you can change some things like partitions and roles, but you cant add a dimension for example. You need to change the project on BIDS and redeploy it
I would recommend starting with Excel Pivot Tables to learn what type of dashboard you will want to create. By working with the end-users, you can understand what information they want/need to see.
Regarding security, as mentioned, by design cubes use Windows auth only. Here's a blog that talks about circumventing standard security.
Also, I have posted a series of videos on how to create OLAP cubes SSAS in SQL Server 2008 using BIDS. You may find this series helpful.