Generating documentation for Power BI - sql-server

Is there a native solution/application/script for creating documentation in Power BI? I am especially interested in documenting all relationships.

Power BI Models (and the new Tabular Models) have DMVs that are separate from the MDSCHEMA rowsets for SSAS multidimensional. While some of the SSAS MD DMVs mostly work, the new TMSchema DMVs work well since they are made specifically for this type of model. The trick is that you must know the connection info. The port and database number change each time you open Power BI Desktop. But generating documentation can be done.
There are a couple of ways to go about it. You can use DAX Studio to get your connection info (a la Chris Webb). Or you can get that info dynamically from Power BI (a la The BIccountant). Using DAX Studio works as a one-time way to get documentation, or if you are ok updating the connection and database info each time you want to run it. The BIccountant way is more dynamic. I haven't tried it, but it looks promising.
To get relationships, you can get your connection info for your Power BI model and then run queries against the following DMVs:
$System.TMSCHEMA_RELATIONSHIPS
$System.TMSCHEMA_TABLES
$System.TMSCHEMA_COLUMNS
Pull those down into Power BI (either in the same model you are documenting, or in a different model). Then either
A) Use the Edit Queries functionality to merge the queries to add the Name column from the Tables DMV and the Explicit Name column from the Columns DMV based upon FromTableID, FromColumnID, ToTableID, ToColumnID.
B) Create relationships between these columns using the modeling functionality of Power BI to achieve the same affect.
Once you've done this and cleaned up column names, hidden/deleted unused fields, you can then use Power BI to create your documentation. You can create plain tables and/or use something like a force-directed graph to show relationships. Here's a screenshot of one that I made.

Related

Long running view in ssas-tabular

I have a SQL Server database where we have created some views based on dim and fact tables. I need to build SSAS tabular model based on my tables and views. But one of the view runs for 1.5 hour inside SQL query (SSMS). Now I need to use this same view to build my SSAS tabular model but 1.5 hour is not acceptable. This view is made up of more than 10 table joins and lot of Where conditions.
1) Can I bring all these tables being used in this view inside my SSAS tabular model but then I am not sure how to join them all and use where clauses inside SSSAS and build something similar to my view. Is that possible? If yes how?
or
2) I will build one time SSAS model from that view and then if I want to incrementally load the data daily, whats is the best way to do that?
The best option is to set up a proper ETL process. That is:
Extract the tables from your source SQL database into a new SQL database that you control.
Transform the data into a star schema.
Load the data from the star schema into SSAS.
On SQL Server, the most common approach is use SSIS packages for data extraction, movement, and orchestration, and SQL Server Agent Jobs for scheduling.
To answer your questions:
Yes, it is certainly possible to bring in all of the tables directly from your source system into your tabular model, but please don't do this! You will only create problems for yourself later on when creating DAX calculations. More information here.
Incrementally loading data is something you decide for each table that is imported into your tabular model. Again, this is much easier if you have a proper star schema, as you would typically run a full processing on all your dimension tables, and then do incremental processing only on the largest fact tables.

SQL Server Report Models

I am currently working on a project which uses SQL Server Reporting Services 2012 to create a (large) set of reports.
We would like to enable some business users to create reports from a live Oracle database, however these are staff who have no skills around SQL or data models, nor an expectation to learn - this is repeatedly stated to be outside their remit (they are analysts recruited to be critical thinkers, not technical staff).
They require the capability of creating ad-hoc queries and reports from the database to answer questions as and when they arise but need to be able to create queries with and/or type clauses to reach record level data and generally create record sets for reading/review.
Currently the only option looks like using the legacy Report Model to pre-define the most commonly used business models on top of the live database as I can not prove that the Tabular Model provides querying capability required. We do not have data that forms into a dimensional model very easily, and even then often have questions that asks for multiple null values to be returned due to significant accepted data gaps.
Is anyone able to shed any light on how the current Microsoft BI stack would let non technical users ask the following type of query and return a single data set in SSRS Report Builder:
Select all records
where
created between two dates and match two keywords in text field 1
or
Updated between two dates and match three keywords in text field 2 and have a status of X
I know that tools such as Business Objects provide this sort of interface but I feel that I must be missing something within the MS solution as they had this so well covered with the Report Model.

Slicing and dicing data from a single table

We have a table with 20M+ records and growing in SQL Server.Our users want to access this table and slice and dice the data preferably using pivot tables.
What is the best way to go about this? We don't have any tools per se in-house except for SSAS. So thinking of create a cube off a single table and giving the users an excel linked file.
Is this a good approach? Are there any other options?
TIA,
Bee
Update:
I apologize I forgot to add that I did try giving the users a Power Pivot file - but it showed up blank when they opened it (oops!). Plus they indicated that they prefer not to use power pivots.
We also have SSAS in-house but Multi-dimensional services. I was hoping to use SSAS tabular until I read that we cannot host both Tabular & MDS in one server. Hence the question.
Thanks again.
The excel option is the only best option. You can slice and dice in pivot table easily.

Best Practise: presenting some data (making a report) from SQL Server

I have many SQL Server databases, each with a few tables containing important (from my point of view) information. I check the data (retrieving for example maximum or minimum value) within those tables using T-SQL queries.
Since I don't want to create views for each of the databases, I'm thinking about most convenient, easier and simply the best way to prepare summary which will be updating each time when opened.
The output file (or web page) will be used internally within technical team. All members can log into database using Windows authentication.
My idea was:
Excel + dynamic T-SQL --> I want to connect to database and execute T-SQL (cursor will go through all database names)
PowerShell (showing table using Out-GridView cmdlet)
PHP - first I will ask about all database names (executing select name fromsys.databases` and then execute query for each DB)
What is in your opinion best way? Do you have any better (from programmers point of view) way of getting such report/data?
You can use SSRS Reports .You have the options of exporting the report data to several formats such as pdf ,excel ,word .You can create a dataset for all your database .Since you are interested in showing aggregation and summation of values ,SSRS reports will be pretty useful in these cases .

Dimensional Level Security / Per User Data Security in SSAS Cube?

I'm part of a team looking to move from our relational data warehouse to a SSAS cube. With our current setup we have an "EmployeeCache" table (basically a fact) which is a mapping from each of our employee ids to their viewable employee ids. This table is joined in our model to our DimEmployee table so that for every query that needs personally identifiable information the DimEmployee records are filtered. The filter is applied from a session variable that is the user id which is making the query.
All of the examples we researched to provide dimension level security in a SSAS cube have required the use of Windows managed security. The systems that create the data that is being analyzed handle their own security. Our ETLs map the security structure into the aforementioned EmployeeCache and DimEmployee tables. We would like to keep this simple structure of security.
As we see it there is no way to pass in session values (aside from using the query string which we're not seeing it possible with Cognos 10.1) to the cube. We're also not seeing any examples out there on security which does not require the use of Windows auth.
Can someone explain if there is a way to achieve dimensional security as I have previously described in a SSAS cube? If there is no way possible could another cube provider have this functionality?
Two thoughts. Firstly, SSAS only supports windows authentication (see Analysis Services Only Windows Authentication) and this is unchanged in Sql Server 2012. But you can pass credentials in the connection string to analysis services. Secondly, could you alter the MDX of every query and add a slicer to restrict the data to only the data a user should see?

Resources