Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago

Measure to get data from direct query table based on EmployeeID

I have 2 tables
Table 1 -  Employee with their activity (id, Points, Date)
Table 2 -  Limited Employee with their Photos (id, Image)
I want to display top employee photos with their name so i am using the second table as direct query source. 
the relation between table 2 and 1 is  1to*
I want to create a measure to get the Employee Photo 

Emp image =
var a = VALUES(EmployeePhotos[Image])
RETURN  IF(ISBLANK(a),Other Image ,a)
this measure working fine with import mode but for direct query mode getting an error 

 




1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous 

     

    DirectQuery has certain limitations compared to Import mode. For example, some DAX functions behave differently or are not supported in DirectQuery mode. Please review the limitations of DirectQuery(https://docs.microsoft.com/power-bi/connect-data/desktop-directquery-about#limitations).

     

    The DAX function VALUES might not work as expected in DirectQuery mode, especially when dealing with binary data like images. You might try MAX instead.

     

    If it still doesn't work, I would suggest that you change this table to import mode. 

     

    Best Regards,
    Jing
    If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!