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
DCrowther
Helper I
Helper I

DirectQuery Lookupvalue function

Hi

I have recently used DirectQuery for the first time to pull back large data sets, however i still need to do lookupvalue queries with other tables so i can relate the data to other categories, it appears LOOKUPVALUE query formula is not compatable with in the DirectQuery Table mode. 

 

Does any know how you can create new lookup columns from another table in a DirectQuery table?

 

Thanks

Dan

3 REPLIES 3
v-shex-msft
Community Support
Community Support

Hi @DCrowther ,

Based on my test, direct query mode not allow you to use a few calculation functions in calculated column. You can consider to use measure to lookup other tables fields.

DAX formula compatibility in DirectQuery mode

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Hi Xiaoxin

 

Thankyou for your reply, i have begun to try to lookup this issue and saw about creating the lookupvalue as a Measure, however even though the tables are related (i have linked the related fields in the 'Model' section) when i come to write the LOOKUPVALUE formula in the Measure, the last part of the formula does not recognise/match the field with with the current table i am in (i.e. its not recognising the search_value) in fact it is only picking the other measures that are in the table. Do i have to some how convert the search_value into a measure?

 

It looks like it works slightly different than from the LOOKUPVALUE function from imported data to LOOKUPVALUE with DirectQuery

 

Any ideas?

Regards

Dan

 

 

HI @DCrowther ,

You can use measure as search value but you can't use it as search field, lookupvalue function not support to search on measure.

You can use calculate function with filter function to instead:

Measure =
CALCULATE (
    MAX ( Table[Amount] ),
    FILTER ( ALLSELECTED ( Table ), [Mesure2] = 1 )
)

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

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.