Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
samdthompson
Memorable Member
Memorable Member

Dax editor

On Friday I built a data model in powerbi desktop and published the draft version to powered. On Monday I did a little bit more work and locally saved the work I had done. I have since had some calamity befall my user profile and a whole bunch of files have been corrupted including the local pbix. I can at best revert to the friday morning model. Is there anyway that I can either:

  1. copy the DAX measures I wrote off the web version or
  2. bring back the entire model?

Friday was a really good day for me and I don’t feel smart enough to rewrite the measures.

Cheers

Sam

// if this is a solution please mark as such. Kudos always appreciated.
1 ACCEPTED SOLUTION
samdthompson
Memorable Member
Memorable Member

Thanks for all the ideas guys, looks like this is a no solution problem at the moment, tried the DVM query but did not work either. After a couple of gins last night I feel much happier about rebuilding all my work.

// if this is a solution please mark as such. Kudos always appreciated.

View solution in original post

4 REPLIES 4
samdthompson
Memorable Member
Memorable Member

Thanks for all the ideas guys, looks like this is a no solution problem at the moment, tried the DVM query but did not work either. After a couple of gins last night I feel much happier about rebuilding all my work.

// if this is a solution please mark as such. Kudos always appreciated.
PowerDAX
Resolver III
Resolver III

Pretty nifty way to work around this with the new analyze in excel option.  Connect to powerbi.com and select the analyze in Excel feature.  Follow the instructions here:  http://www.sqlbi.com/articles/import-data-from-tabular-model-in-excel-using-a-dax-query/ to change the data connection from a model type to a query type and pass in the following DMV query to extract the definition of your metrics:

 

SELECT [MEMBER_UNIQUE_NAME] AS [CALCULATED_MEASURE],
    [MEMBER_CAPTION] AS [CAPTION],
    [EXPRESSION]
FROM $system.MDSCHEMA_MEMBERS
WHERE CUBE_NAME ='Adventure Works'
AND [MEMBER_TYPE]=4
powerdax.com
orionlee
Employee
Employee

Note that the DAX editor feature is not likely to be implemented soon given the number of votes and the status on the idea. One feature that could help in your situation that is a little closer to being implemented is the ability to export a PowerBI report as a pbix file:

https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/6856196-export-power-bi-report-in...

 

One hacky solution that might be a bit hit and miss is to rename your pbix file to a zip and copy the DataModel inside the zip to a copy of your "good" version you can revert to from Friday. It's a long shot but if you're lucky things might magically work.

 

Also consider posting in the Desktop section of the PowerBI forum to see if any of the Desktop experts have ideas for recovering information from a corrupted pbix file.

ankitpatira
Community Champion
Community Champion

@samdthompson Unfortunately I am not aware of any way currently to access the code behind measure in powerbi.com since it doesn't have data modelling feature. You can try Analyze in Excel feature which lets you connect frmo Excel live to powerbi published dataset and excel treat it as analysis server and see if there is any add-in that you can use to access code behind measures. (I've played a bit for you and could not find anything).

 

If you're really after code behind and can't rewrite your best bet is to keep the report as it is until Microsoft publishes updates to powerbi service to have query editor and data modelling. You can vote for idea below.

 

https://powerbi.uservoice.com/forums/265200-power-bi-ideas/suggestions/11036421-edit-queries-option-...

 

You can also send pbix file to Microsoft support explain your situation and see if they can fix for you.

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors