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
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
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.