Forum Discussion

izineela's avatar
izineela
Regular Visitor
3 years ago

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 

 

And here is the DAX code

 

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

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

  • izineela's avatar
    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.