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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
danyalsaeed
Frequent Visitor

SASS Cubes connection with Power BI and Limit the importing data

Hello,

I have multiple databases in my server, and I have to select only one of them, and then in that database I have multiple cubes, and again I have to select one particular cube, and then from that cube I have to select multiple tables with their some selective columns. 

Now there are two problems:
1. In Power BI SSAS connector we only have fields to mention Server Name and Database name, but I also have to mention the cube name, because otherwise it gets confused and generate an error (screenshot attached) when I use a table name (e.g. 'Calendar') in my DAX query, because the same table name exist in multiple cubes in that database. So, How can I do it?

Connection Wizard.PNG


Connection Error.PNG

2. I also have to limit the data by years, e.g. I just want to import the data for 2021, so what would be the DAX query for that?


I will really thankful to one who can help me solve this issue.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@danyalsaeed , if you are using the cube, try the MDX code

 

Also, reprocess the cube and try

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
danyalsaeed
Frequent Visitor

Here's the MDX code which has resolved my issue:

SELECT [Measures].[Revenue] ON 0,
[Customers].[City].[City] ON 1
FROM [Sales]
WHERE ( 
      strtomember("[Calendar].[YEAR].&[" + Format(now(), "yyyy") + "]")
      )

 

amitchandak
Super User
Super User

@danyalsaeed , if you are using the cube, try the MDX code

 

Also, reprocess the cube and try

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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