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
Anonymous
Not applicable

DAX expression works with imported data but not with direct query mode

Following DAX expression works with imported data but not with direct query:

 

[SourceABCKey] IN SELECTCOLUMNS(FILTER('XYZUserDataAccess', 'XYZUserDataAccess'[UserName]=UserName()),
"Sourcekey"
,[ParameterCode])

 

There are 3 tables:

Table1 - XYZUserDataAccess - This contains username and Parameter, say SalesDistrict or School.

Table2 - DimParameter, say DimSalesDistrict or DimSchool.

Table3 - FactTable with SalesCount or StudentCount and Parameter - SalesDistrict or School.

 

Relationship exists between Table2 to Table1, and Table2 to Table3.

 

Tha above DAX expression works on Table2 in imported mode.

 

In direct query mode it gives error. Tried various expressions on all 3 tables on various scenarios, but non worked. 

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous

 

Not all DAXformulas works with direct query mode, theer are some limitation because the way those formulas are evaluated .

 

https://docs.microsoft.com/en-us/sql/analysis-services/tabular-models/dax-formula-compatibility-in-directquery-mode-ssas-2016?view=sql-server-2017

 

Givea  try to the below opion:

Diect Query.PNG

 

 

Thanks

Raj

Anonymous
Not applicable

Thank you for reply. I will try it out.

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.

Top Solution Authors