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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
izineela
Regular Visitor

Measure is not working in Direct Query mode

Hello everyone,

I am attempting to switch one table in my Power BI report from Import mode to DirectQuery mode.

The below measure code works correctly in Import mode but returns blank values in DirectQuery mode. Interestingly, when I manually input the property_id I use for filtering instead of using a variable, it works fine:


Here are the two tables I am using 

izineela_1-1689841365356.png

 

And here is the DAX code

izineela_0-1689841281358.png

 

I have verified that the property_id is returning the expected IDs.

Any assistance you can provide on this matter would be highly appreciated.

 

Thank you.

2 REPLIES 2
izineela
Regular Visitor

Hello @v-jianboli-msft, I attempted to use MAX instead, but the same error persists. Interestingly, when I output property_id, it appears to be populated correctly.

v-jianboli-msft
Community Support
Community Support

Hi @izineela ,

 

This issue may caused by the function FIRSTNONBLANK.

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

You may need to modify your dax and use somthing else to replace it.

 

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.