Power BI Nibble No. 4: Power BI Version Compare

From Nibbles Wiki
Jump to navigation Jump to search

Intro

Power bi nibbles logo.png

This is a quick tool I built to make it easier to compare two versions of a Power BI solution or help document code in a single one.

Video


Documentation

What is Power BI Version Compare for?

Power BI Version Compare was created to make it easier to compare two versions of the same solution and see if measures, calculated columns, calculated tables, functions, parameters, or queries were added or changed. However, it can also be used with just one solution, to see its objects in a table and as a form of documentation (e.g. you can export the table).

What is Power BI Version Compare not for?

It only picks up what's mentioned above. For instance, it will not identify relationship additions or changes, data model-level formatting or data type changes, any adjustments in visuals, etc. You should treat this as a help, but still manually track changes.

Finally, Power BI Version Compare is a developer tool, not a general user tool.

Instructions

(These instructions assume you have installed DAX Studio and have some familiarity with it.)

  • Decide if you are only going to look at one file or compare two
  • Set the compare_files parameter to FALSE (for one) or TRUE (for two); please note that changing this variable with already loaded data still requires a full refresh for the "Diff?" flag to work correctly
  • Set the source_data_dir parameter to where you will export the source files you generate with DAX Studio; make sure you put the final "/" on the path
  • Open up the one or two Power BI solutions as appropriate
  • Open DAX Studio and connect to the new (or only) solution
  • Change the left most tab to "DMV" (look at the bottom right for the tabs)
  • Use the "Output" tab (top left) to select the static Excel option (bottom right button in the drop-down)
  • Run select * from $SYSTEM.DISCOVER_CALC_DEPENDENCY, saving it as DISCOVER_CALC_DEPENDENCY_new.xlsx in the source_data_dir
  • Run select * from $SYSTEM.TMSCHEMA_EXPRESSIONS, saving it a TMSCHEMA_EXPRESSIONS_new.xlsx in the source_data_dir
  • If you also have an old file you also want to incorporate, use the "Connect" button (top right) to change to the old solution and rerun the previous two steps, just changing "_new" to "_old" in the output file names (you actually will probably have to close and reopen DAX Studio)
  • Do a "Home | Refresh" in Power BI Version Compare

I recommend you publish results to a workspace to make it so you can export the table to Excel and other conveniences. :-)

Links

Final thoughts...
  • Thanks for visiting Nibbles Wiki!
  • Use Nibbles Wiki advice, information, etc. at your own risk. :-)
  • The inclusion of any company names or logos, product names, etc. does not imply their endorsement or support of Nibbles Wiki.
  • Nibbles Wiki respects copyrights (while believing in fair use). If you have any concerns, please contact Alan.