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
Jimmy801
Community Champion
Community Champion

Quering a SSAS with DAX with folders/subcubes

Hello Experts

 

I'm wondering if somebody can give me some guidline how to do or if its even possible to query a SSAS with power query with a DAX-statement (not MDX). I tried to use DAX-studio to give it a try, and a simple DAX-query like Evaluate 'Employee' works just fine. (see on the left side up, also a subcube is specified - ITRS... hours)

Jimmy801_0-1606477572341.png

 

the thing I would like to achieve is to use a DAX-query in the power query connector for SSAS

Jimmy801_2-1606477745020.png

 

and it's not working. I get this error

Jimmy801_3-1606477765418.png

What I've noticed is that we have in our database "OLAP_BI" whe have some folders/subcubes and in the PBI connector I can only define a Database. So how can I possible define a subcube with DAX? like I'm doing in MDX with FROM [Project]?

Jimmy801_4-1606477931085.png

 

Any help is really appreciated

 

BR

 

Jimmy

 

4 REPLIES 4
AntrikshSharma
Community Champion
Community Champion

@Jimmy801 If I understand correctly you are trying to query MDX cube with DAX, right? I don't think that's possible, you can use MDX to query DAX but not the other way around.

 

With DAX I can get easily data from a SSAS Tabular Model into Power query:

1.png

Hello @AntrikshSharma 

 

many thanks for your answer. I cannot tell you if I have a MDX-cube. But even if so... I'm able to query it with DAX-Studio where this statement gives me the table Employee

Jimmy801_0-1606716401215.png

I can navigate on the left to the database OLAP_BI and can choose the subcube ITRS418 Hours. 

But on Power Query my only parameter is the Database OLAP_BI

Jimmy801_1-1606716513645.png

in MDX you would write FROM [ITRS418 Hours]. Is there any way to query this cube with DAX?

 

BR

 

Jimmy

 

 

@Jimmy801 Yup, I have Tabular model deployed, I no experience with MDX. Why don't you write MDX script in the input box? I think it works in DAX studio because Excel generates MDX code, so it could be working only for compatibility and ease of use. But anything other than that may not have an idea of EVALUATE syntax.

 

The Basic MDX Query (MDX) | Microsoft Docs

Hello @AntrikshSharma 

 

I already wrote. But as sometimes I have performance issues and because I've some more experience in DAX, I would prefer to write the query in DAX. But it seems no way to achieve this in my situation. What a pity

 

BR

 

Jimmy

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