cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Jimmy801
Super User III
Super User III

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
Super User II
Super User II

@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
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

April Update

Check it Out!

Click here to read more about the April 2021 Updates!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

secondImage

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors