This project is read-only.

Using the DAX editor for DAX queries

1. Press Ctrl+N to create a new file. Choose Text file.
2. Choose Save As. Change the filter from Text files to All files, and save the file with a .dax file extension. The file is now a DAX file and can be used for DAX queries.
3. optional To get IntelliSense for tables, columns, and members:
  • Click inside the DAX file and then press F4 to show the property grid.
  • Enter the database name and server name in the property grid.

Using the DAX editor to edit measures in tabular models

1. Create a tabular model. Save the BIM file.
2. From the Model menu, select Create DAX file for model. This adds a .dax file to the tabular model project.
3. Double-click to open the DAX file. If you want IntelliSense for column names:
  • Click inside the DAX file and then press F4 to show the property grid.
  • Enter the workspace database name (copy/paste from bim file properties) and workspace database server name in the property grid.
4. Edit measures in the .dax file.
5. To save your new or modified measures to the .bim file:
  • Save and close the .bim file.
  • Click the DAX file to activate.
  • Select DAX->Save Measures to BIM file.
  • Reload the BIM file. New measures appear in the far left corner of the measure grid.
6. To get measures from the BIM file to the DAX file:
  • Save the .bim file.
  • Click the DAX file to activate.
  • Select DAX->Get Measures from BIM file. The contents of the DAX file are overwritten with the measures from the BIM file. This will unfortunately overwrite any comments you have made in the DAX file.

Last edited Dec 6, 2011 at 10:14 PM by cathyk, version 1

Comments

PAPutzback Apr 29, 2014 at 3:03 PM 
I have a *.dax file and the properties have two categories, General and Misc. Under general I have a greyed out connection string that I can't edit and under Misc I have two properties with no name that can't be edited and both already say Value cannot be null. Parameter name:input
But maybe this is due to how I created the DAX file. In my model menu there is no option "Create DAX file for model"

wilsonch Aug 16, 2013 at 12:10 AM 
Well, something is working for me in the following way and sense: I begin to type a word; I hit "ctrl-space"; a list of options pops up, including (highlighted) a completion of what I started to type. "Ctrl-space" is mentioned in the write-up on the home page: "IntelliSense support for keywords, functions, columns, and measures. Press Ctrl+Space to show IntelliSense." Ditto for Autocomplete. I am continuing to play around with it.

ToddChitt Feb 19, 2013 at 7:48 PM 
Why does the operation ins step 2 of the instructions ("From the Model menu, select Create DAX file for model.") only create ONE measure. Would it not read ALL the measures from ALL the tables?

qiyuef Feb 13, 2013 at 12:06 AM 
intellisense doesn't work for me either

Challen Feb 28, 2012 at 2:52 AM 
yes, I have the same issue as EricLeBouffon, I do the same as "Enter the workspace database name (copy/paste from bim file properties) and workspace database server name in the property grid" so I think the database and server name is correct, why there is no intellisense? can anybody give some comment to this issue? thanks in advance.
Challen Fu

EricLeBouffon Feb 21, 2012 at 5:27 PM 
No intellisense?
I entered both DatabaseName and ServerName as indicated in step 3 but can't seeany intellisense around...
As a test, I created an invalid measure and no warning of any sort...
Am I missing something?