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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.