<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic DAX expression for below query in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/DAX-expression-for-below-query/m-p/447688#M13785</link>
    <description>&lt;P&gt;I have 5 tables. Below the attached screenshot with tables and fields.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="table_structure.png" style="width: 600px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/103073iBF5602AE1E5FCA43/image-size/large?v=v2&amp;amp;px=999" role="button" title="table_structure.png" alt="table_structure.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to display the reports details based on the User project id and partner id.&lt;/P&gt;&lt;P&gt;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.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below the expression which is working in "import mode"&lt;/P&gt;&lt;P&gt;Partner Role:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;'Partner' = [partner_id] IN SELECTCOLUMNS (FILTER ( 'users', 'users'[id] = VALUE(USERNAME()) ),  "partners", [partner_id])&lt;/PRE&gt;&lt;P&gt;Project Role:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;'Project' = [id] IN SELECTCOLUMNS (FILTER ( 'user_project', RELATED('users'[id]) = VALUE(USERNAME()) ),  "projects", [project_id])&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 25 Jun 2018 17:32:56 GMT</pubDate>
    <dc:creator>rsathish_red</dc:creator>
    <dc:date>2018-06-25T17:32:56Z</dc:date>
    <item>
      <title>DAX expression for below query</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/DAX-expression-for-below-query/m-p/447688#M13785</link>
      <description>&lt;P&gt;I have 5 tables. Below the attached screenshot with tables and fields.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="table_structure.png" style="width: 600px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/103073iBF5602AE1E5FCA43/image-size/large?v=v2&amp;amp;px=999" role="button" title="table_structure.png" alt="table_structure.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to display the reports details based on the User project id and partner id.&lt;/P&gt;&lt;P&gt;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.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below the expression which is working in "import mode"&lt;/P&gt;&lt;P&gt;Partner Role:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;'Partner' = [partner_id] IN SELECTCOLUMNS (FILTER ( 'users', 'users'[id] = VALUE(USERNAME()) ),  "partners", [partner_id])&lt;/PRE&gt;&lt;P&gt;Project Role:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;'Project' = [id] IN SELECTCOLUMNS (FILTER ( 'user_project', RELATED('users'[id]) = VALUE(USERNAME()) ),  "projects", [project_id])&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jun 2018 17:32:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/DAX-expression-for-below-query/m-p/447688#M13785</guid>
      <dc:creator>rsathish_red</dc:creator>
      <dc:date>2018-06-25T17:32:56Z</dc:date>
    </item>
    <item>
      <title>Re: DAX expression for below query</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/DAX-expression-for-below-query/m-p/448867#M13801</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/68330"&gt;@rsathish_red&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It seems you added them in the tables as calculated columns. But the SSAS live mode doesn't support calculated columns. There could be two workarounds.&lt;/P&gt;
&lt;P&gt;1. Add them in the SSAS;&lt;/P&gt;
&lt;P&gt;2. Create a measure instead. Please give it a try.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://ibb.co/fbnH0T" target="_blank"&gt;&lt;IMG src="https://ip1.i.lithium.com/bfde798296de379f09b883556f91b5eda101a2e1/68747470733a2f2f696d6167652e6962622e636f2f63644b3837382f4441585f65787072657373696f6e5f666f725f62656c6f775f71756572792e706e67" border="0" alt="DAX_expression_for_below_query" /&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: 'Segoe UI'; font-size: 10.5pt; color: #333333;"&gt;Best Regards,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: 'Segoe UI'; font-size: 10.5pt; color: #333333;"&gt;Dale&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jun 2018 02:31:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/DAX-expression-for-below-query/m-p/448867#M13801</guid>
      <dc:creator>v-jiascu-msft</dc:creator>
      <dc:date>2018-06-27T02:31:38Z</dc:date>
    </item>
    <item>
      <title>Re: DAX expression for below query</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/DAX-expression-for-below-query/m-p/455433#M14012</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/68330"&gt;@rsathish_red&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Can you mark the proper answer as a solution please?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Dale&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jul 2018 10:03:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/DAX-expression-for-below-query/m-p/455433#M14012</guid>
      <dc:creator>v-jiascu-msft</dc:creator>
      <dc:date>2018-07-05T10:03:15Z</dc:date>
    </item>
  </channel>
</rss>

