简体   繁体   中英

Generating documentation for Power BI

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. 在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM