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
DonRitchie
Frequent Visitor

Create a table and copying a column from a dataset in a DirectQuery local model

This seems more complicated than it should be.

 

I am connected to a local model of a dataset.  There is a table "SALES" with a column "CUSTOMER".  I select New Table under Modeling ribbon.

 

DATE = SELECTCOLUMNS(SALES,"Customers", SALES[CUSTOMER]) returns an error: The resultset of a query to external data source has exceeded the maximum allowed size of '1000000' rows.
 
DATE = SELECTCOLUMNS(SALES,"Customers", DISTINCT(SALES[CUSTOMER])) returns an error:OLE DB or ODBC error: Query (3, 40) A table of multiple values was supplied where a single value was expected. Technical Details: RootActivityId: 3f5fb32a-a5b8-4738-9237-06a50d9075dc Date (UTC): 8/8/2022 4:24:54 PM.
 
What am I doing wrong?
1 ACCEPTED SOLUTION
foucaultf
Frequent Visitor

Hi @DonRitchie ,

 

Please note: SELECTCOLUMNS function is not supported for use in DirectQuery mode when used in calculated columns or row-level security (RLS) rules.

 

Alternatively, you can try import mode to connect data.

 

For more information, please refer to: SELECTCOLUMNS function (DAX) - DAX | Microsoft Docs

 

Best Regards

View solution in original post

4 REPLIES 4
foucaultf
Frequent Visitor

Hi @DonRitchie ,

 

Please note: SELECTCOLUMNS function is not supported for use in DirectQuery mode when used in calculated columns or row-level security (RLS) rules.

 

Alternatively, you can try import mode to connect data.

 

For more information, please refer to: SELECTCOLUMNS function (DAX) - DAX | Microsoft Docs

 

Best Regards

How do I import a dataset I don't have access to alter?

foucaultf_0-1660268188206.png

Please select import option. Then you can use DAX without limitations.

amitchandak
Super User
Super User

@DonRitchie , Try like

DATE = summarize(SALES,"Customers", SALES[CUSTOMER])

 

My suggestion would be better get from database as import , using SQL in advance connection option

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