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!
Hi David, thanks!
What exactly do you mean with "dataconnections only"?
What does step "QueryNames" return?: Do you see the names of your "dataconnections only" queries in column "QueryName"?
Re your warning on the "Demoted Header": Good catch, but check out the next step "Filtered Rows 3": There I cater for both cases: First line of code in header or not. So you can paste in 2 different ways without running into a problem here.
ImkeF Apologise for the fact that this dialogue continues just i think i am close to resolving this and want to persist to benefit from your hard work and hopefully your satisfaction.
By 'Data connections only' what i mean is that the query does not load the data to the data model but makes a connection only.
I often use this technique to prepare connections to data without actually loading the data when for example conneccting to multiple sources of data from different sources but with a similar data schema. Then with all the 'dataconnections only' prepared and tested i then 'Append' all the connections together to make 1 large fact tablewhich is loaded into the datamodel.
Thus i am thinking your code only sees the final fact table and not all the 'dataconnecctions only'.
What i hoped for was a sankey that showed the flow of queries from ALL the 'data connections only' into the fact table.
Looking at the code it is the 'parent' that is creating the issue as it returns a single parent (the last append table) for the fact table.
Anyway this is getting too complicated...if you have the patience then maybe we should take this offline ?
David