Is there a way to retrieve all measures from one pbix file and export or copy them to a txt file?
That would help for further documentation and as well mass changes if needed.
Go to Solution.
Yes there is. You can run a DMV query against the Tabular cube.
Essentially you need to connect to your Power BI Desktop instance from a tool such AS Sql Server Management Studio (or MDX Studio) and issue the following Query
Proud to be a Datanaut!
I found a better solution, following that video: https://www.youtube.com/watch?v=rYlIp1PrBcA
Basically, in the DAX Studio, you click on MDSCHEMA_MEASURES.
You get an SQL, execute it and you got a lot of details on your measures.
That you can of course export directly to Excel.
You'll have to use DAX Studio http://daxstudio.codeplex.com/
How to do it is described here http://exceleratorbi.com.au/getting-started-dax-studio/
I think I'll have to find a better DMV for you too.
The one provided only returns 1 row against a PBI Desktop model. However it works beautifully against Tabular cubes.
If you run the following DMV query, it shows a list of the various meta data tables you can query.
SELECT * FROM $System.DBSchema_Tables
So for a list of Columns
SELECT * FROM $SYSTEM.DBSCHEMA_COLUMNS where Table_Schema = 'Model'
I didn't realise you could use DAX Studio for DMV's but I guess that makes sence. I normally do my DMV work in SSMS, (or in Power BI Desktop itself) and that is a great article by @MattAllington
Yes the other thing I recommend is the Power Pivot Utilities Tool https://www.sqlbi.com/tools/power-pivot-utilities/
However whether you install the PP Util or not => start DAX Studio from EXCEL even if you just install the DAX Studio Add-In
This way when you are getting the List of ALL Measures in your Model you'll get the option to Output in Excel
If you don't start from within Excel you won't get that Option!
Many Thanks @Sean and @Phil_Seamark! I learned a lot!
I used the SQL from Phil with the DAX studio.
Currently we are not using an SQL server. The data for PBI comes from Excel (Essbase).
Now i have the list of the measures, yes, but not their respective calculation. Is there a way to get them?This would really help me to make mass changes.
I haven't seen a DMV for this, but the PBIX file is just a .zip file so you could possibly parse the raw text (would be pretty ugly but you could do it in Power BI
Thanks again Phil!
I did the work manually.
Engage and empower students with Power BI!
Continue your learning in our online communities.
Travel to Melbourne and network with thousands of peers!