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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
PappaG
Regular Visitor

DaxStudio List of Measures

I am trying to generate a list of measures that exist on a PBI desktop file with a live connection to a SQL database. Using DaxStudio "select * from $SYSTEM.MDSCHEMA_MEASURES" retrieves the Measures that exist in the backend SQL db but not the measures that exist on the Desktop file!

Any ideas? 

1 ACCEPTED SOLUTION

Well, if you are connecting to SSAS via Live Connection vs Import, then that is the answer. It cannot show you your own measures in the PBIX file at this time. I don't know if that is a feature that is being worked on or not.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

View solution in original post

5 REPLIES 5
edhans
Super User
Super User

Is your data in SSAS on the SQL server, because DAX measures don't exist in SQL databases themselves, just SSAS. 

 

If SSAS, have you confirmed you connected DAX Studio to your PBIX file when it was open? It defaults to connecting to an SSAS server (third radio button when DAX Studio launches)



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Hi Edhans

 

I tried to connect to the Opened local PBIX file that has the live connection to SQL and get the following message.

 

 

Then when I Connect to the Tabular Server I do see all the tables in the PBIX file. Run select * from $SYSTEM.MDSCHEMA_MEASURES and it will not list any of the measures that I created in the Desktop App. Only shows measures that were developed in SQL(I think!) not by me anyway!

 

 

 

Right, because the SSAS server doesn't know what you've done in the PBIX file. To connect to the PBIX file do the following:

  1. Close DAX Studio.
  2. Start Power BI Desktop and load the PBIX file
  3. Start DAX Studio
  4. Connect to the Power BI desktop file.

If you do it in any other order, it likely will not connect.

 

20200217 12_06_35-Connect To.png



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting



@edhans wrote:

Right, because the SSAS server doesn't know what you've done in the PBIX file. To connect to the PBIX file do the following:

  1. Close DAX Studio.
  2. Start Power BI Desktop and load the PBIX file
  3. Start DAX Studio
  4. Connect to the Power BI desktop file.

If you do it in any other order, it likely will not connect.

 

20200217 12_06_35-Connect To.png


Thanks. I tried what you suggested and got the following message.

DaxStudio Error message.GIF


 

Well, if you are connecting to SSAS via Live Connection vs Import, then that is the answer. It cannot show you your own measures in the PBIX file at this time. I don't know if that is a feature that is being worked on or not.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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