Forum Discussion
How do you document your models?
- Anonymous10 years ago
My documentation style is pretty low tech as these things go. Nothing automated but it's easy enough.
I write most of my columns and measures out in Notepad++ and then copy it into Power BI. The advantages here are 1) you can format your code nicely without trouble and 2) your documentation is half-done already. Especially if you comment your code as you go.
Beyond that it's mostly a matter of organizing the code and documenting the queries. For the queries, open the advanced editor and copy all that code. You can later recreate any query instantly by pasting that back into a blank query*.
For the documentation itself, my preference is to organize by tables. A brief description of the data represented, the query, a list of the columns and their data types, then the custom columns in alphabetic order and the measures, same.
I tend to create master datasets and use them each for several different reports, so I tend not to document the reports themselves very extensively. I just keep a changelog of requests that I get about them, because everyone around here likes to change their minds about what charts they want to see. One changelog per report, starting with a note about which dataset it's coming from.
I've had to recreate one lost report so far. The original took about a week, the recovery took about three hours, and to be fair I was watching a movie while I did it.
*Assuming in some cases that you've already established a connection and credentials with the data source from the machine you're working at.
- 10 years ago
How to connect PBI to DAX Studio: http://exceleratorbi.com.au/getting-started-dax-studio/
incl. tons of other awesome stuff you can do with it!
Using Dax Studio to extract the measures: http://exceleratorbi.com.au/extract-calculated-fields-from-an-excel-workbook/
To extract all Queries at once, start sending a frown but don't send the mail:
http://www.thebiccountant.com/2016/01/30/visualize-query-dependencies-in-power-query-and-power-bi/
This also describes a technique that helps you visualize dependencies between complex queries.
If you have very many different measures and you want to visualize their dependencies under each other as well, you can use Sankey-diagramm as well: http://www.thebiccountant.com/2015/12/18/visualize-dependencies-between-your-dax-measures/
- Anonymous10 years agoNot applicable
ImkeF The extract the query by sending a frown = Awesome!
- DavidMoss10 years agoAdvocate V
ImkeF just what i was looking for the Sankey chart looks like a perfect way to document both PQ queries and measures. Along with DAX studio to document tables and measure formulas this should save loads of time. Thanks a million. :-)
- ImkeF10 years agoCommunity Champion
DavidMoss Thanks David.
For the other readers: Link to Sankey for PQ queries: http://www.thebiccountant.com/2016/01/30/visualize-query-dependencies-in-power-query-and-power-bi/
- DavidMoss10 years agoAdvocate V
Hi ImkeF i was trying to use your Power Query Management Studio solution yesterday but i encountered the following errrors. Can you please advise where i might be going wrong or if there is a work around.
I followed the instructions on that blog and when i click RefreshAll in your excel file i get an error ….”The connection could not be refreshed…..” and then another error stating “The following data range failed to refresh ExterneDaten_1” …..any suggestions ???