locked
DAX expression for below query RRS feed

  • Question

  • I have 5 tables. Below the attached screenshot with tables and fields.

    I need to display the reports details based on the User project id and partner id.

    Users have two roles 'Project Role' and 'Partner Role'. I have created two Roles in the Powerbi report. One is for Partner and another role Project. 

    Below the expression which is working in "import mode"

    Partner Role: 

    'Partner' = [partner_id] IN SELECTCOLUMNS (FILTER ( 'users', 'users'[id] = VALUE(USERNAME()) ),  "partners", [partner_id])

    Project Role: 

    'Project' = [id] IN SELECTCOLUMNS (FILTER ( 'user_project', RELATED('users'[id]) = VALUE(USERNAME()) ),  "projects", [project_id])

    Now we are using Direct query. I have created Analysis Service and created model. How should i write DAX expression in Direct query for above scenario?

    Monday, June 25, 2018 5:18 PM

Answers

  • Hi rsathish.redcrackle,

    Thanks for your question.

    >>>Now we are using Direct query. I have created Analysis Service and created model. How should i write DAX expression in Direct query for above scenario?
    As I said in your another post, If it works in 'import' mode, then it should work in Direct query mode either. For tabular 1200 and higher models in DirectQuery mode, many functional limitations in earlier versions no longer apply. For DAX formulas in-particular. For more information, please refer to DAX formula compatibility in DirectQuery mode.


    Best Regards
    Willson Yuan
    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    • Proposed as answer by alexander fun Friday, June 29, 2018 1:12 PM
    • Marked as answer by AV111Editor Tuesday, February 19, 2019 5:52 PM
    Tuesday, June 26, 2018 2:58 AM