Extract DAX formulas
-
Extract DAX formulas
Posted by DSC Communities on April 23, 2018 at 12:47 pm-
Pavan Sistla
MemberApril 23, 2018 at 12:47 PM
??Hello Everyone,Greetings for the day !!!
Could you please help me in extracting the DAX formulas written in measures tables into an excel or a notepad?
Thank You and Regards,
——————————
Pavan Sistla
—————————— -
William Rodriguez
MemberApril 23, 2018 at 4:48 PM
Greetings ĀCould you please elaborate?
A few useful tool:
- DAX STUDIO – This will allow you to write code, see code executions, export results, etc.Ā
- Power Pivot Utilities – This is an excel-addin that will detail all DAX code within your model and export it into an excel table
Ā
Thanks!
William?
——————————
William Rodriguez
Business Analyst
——————————
——————————————- -
I believe what Pavan is saying is he wants to extract all the DAX from the measures he’s created in Power BI, in bulk.Ā This is definitely something I’ve wanted to do before, as opening each and grabbing the formula is a pain.Ā And if for some reason you need to remove the table they are built in, you lose the measures unless you move them one-by-one.
I just tried the DAX studio you suggested and it looks like that’s a great solution, thanks, William!
——————————
JJ Hepp
Arrow Lift
——————————
——————————————- -
Aaron Gernhardt
MemberApril 24, 2018 at 7:27 AM
You can run the DMV view against the database as well:select * from $SYSTEM.MDSCHEMA_MEASURES
——————————
Aaron Gernhardt
Senior Programmer / Analyst
——————————
——————————————- -
William Rodriguez
MemberApril 25, 2018 at 9:22 AM
Greetings:I tried @AaronĀ Gernhardt’s suggestion, and it worked brilliantly!
What I did:Ā
- Open DAXSTUDIO
- Connect my Model
- run the code: ” Select * From $SYSTEM.MDSCHEMA_MEASURES”
The results are every measure in your model – detailing each expression command! (i.e., the DAX code per measure).Ā
This is very cool!
The benefit of utilizing DAX Studio is that you can export your results to excel (as well as a text file, etc. ) so that one can easily see all the data in one table.Ā
Glad to be apart of this discussion.
Thanks!
William——————————
William Rodriguez
Business Analyst
——————————
——————————————- -
Lawrence Coffee
MemberApril 26, 2018 at 7:58 AM
Can this tool be leveraged to download the DAX formulas in the Calculated columns as well?——————————
Lawrence Coffee
Consultant
San Antonio TX
2109201408
——————————
——————————————- -
For some more advanced analysis from the same guys check out this tool:Ā vertipaq analyzer.
Lot’s of good stuff in there. Not only gives you all your measures and calculated column dax formulas but makes it easy to identify inefficiencies in your model.
Anthony
——————————
Anthony
——————————
——————————————- -
Igor George Abdo
MemberApril 26, 2018 at 2:30 PM
DaX Studio it’s the best software to do this.——————————
Igor George Abdo
Business Intelligence Analyst
5547999816210
Oxford Porcelanas S/A
SĆ£o Bento do Sul
– Brazil
——————————
——————————————- -
Aaron Gernhardt
MemberApril 27, 2018 at 7:37 AM
To retrieve your calculated columns in DAX Studio:Connect to your SSAS or Power BI instance and run the following statement:
select * from $SYSTEM.TMSCHEMA_COLUMNS
Look in the Expression column to retrieve your Calculated Columns
——————————
Aaron Gernhardt
Senior Programmer / Analyst
——————————
——————————————- -
Lawrence Coffee
MemberApril 27, 2018 at 10:25 AM
Awesome! Very Helpful – Thank you——————————
Lawrence Coffee
Consultant
San Antonio TX
2109201408
——————————
——————————————-
DSC Communities replied 7 years, 4 months ago 1 Member · 0 Replies -
-
0 Replies
Sorry, there were no replies found.
The discussion ‘Extract DAX formulas’ is closed to new replies.