<?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 Re: Convert SQL to DAX in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-SQL-to-DAX/m-p/3632411#M140488</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="659316" data-lia-user-login="TechMG" class="lia-mention lia-mention-user"&gt;TechMG&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm sorry I changed my dax.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Table = FILTER(ADDCOLUMNS(SELECTCOLUMNS('P',"ProgramId",[ProgramId],"ProgramName",[ProgramName]),"InternalEmailAddress",LOOKUPVALUE(
        'dimuser'[InternalEmailAddress],
        'dimuser'[UserId],
        'userclinicbridge'[ClinicId]
    )),[InternalEmailAddress]=userprincipalname())&lt;/LI-CODE&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Neeko Tang&lt;/P&gt;
&lt;P&gt;If this post &lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 11 Jan 2024 06:10:03 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-01-11T06:10:03Z</dc:date>
    <item>
      <title>Convert SQL to DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-SQL-to-DAX/m-p/3631324#M140454</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi, I have a paginated report which access the source as Power BI data model, both are deployed in service. I have set of parameters exist in Paginated Report. For ex. ProgramName. It contains list of programnames and use will select the respective program for seeing the data. Now, we have RLS implemented in data model and it is working fine. However, the user can see all the programs in parameter rather he want see only his program. I am planning to restrict the program names in parameter based on user logged in to the system. I have tried below but no luck.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;SQL:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;select&lt;/SPAN&gt; &lt;SPAN class=""&gt;distinct&lt;/SPAN&gt; P.ProgramId ,P.ProgramName ,DU.InternalEmailAddress &lt;SPAN class=""&gt;from&lt;/SPAN&gt; gold.programid P &lt;SPAN class=""&gt;INNER&lt;/SPAN&gt; &lt;SPAN class=""&gt;Join&lt;/SPAN&gt; gold.dimclinic C &lt;SPAN class=""&gt;ON&lt;/SPAN&gt; P.ProgramId &lt;SPAN class=""&gt;=&lt;/SPAN&gt; C.ProgramId &lt;SPAN class=""&gt;INNER&lt;/SPAN&gt; &lt;SPAN class=""&gt;Join&lt;/SPAN&gt; gold.userclinicbridge UC &lt;SPAN class=""&gt;ON&lt;/SPAN&gt; C.ClinicId &lt;SPAN class=""&gt;=&lt;/SPAN&gt; UC.ClinicId &lt;SPAN class=""&gt;INNER&lt;/SPAN&gt; &lt;SPAN class=""&gt;JOIN&lt;/SPAN&gt; gold.dimuser DU &lt;SPAN class=""&gt;ON&lt;/SPAN&gt; DU.UserId &lt;SPAN class=""&gt;=&lt;/SPAN&gt; UC.UserId &lt;SPAN class=""&gt;WHERE&lt;/SPAN&gt; DU.InternalEmailAddress &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;@UserId&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;DAX:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;EVALUATE ADDCOLUMNS( 'Program'[ProgramId], 'Program'[ProgramName], LOOKUPVALUE('dimclinic'[ProgramId],'Program'[ProgramId]), LOOKUPVALUE('userclinicbridge'[ClinicId],'dimclinic'[ClinicId]), "InternalEmailAddress",LOOKUPVALUE('dimuser'[InternalEmailAddress],'dimuser'[UserId],'userclinicbridge'[ClinicId]) )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I need to apply filter as I mentioned in SQL. As I am new to DAX, seeking some help. Thanks&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2024 19:58:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-SQL-to-DAX/m-p/3631324#M140454</guid>
      <dc:creator>TechMG</dc:creator>
      <dc:date>2024-01-10T19:58:52Z</dc:date>
    </item>
    <item>
      <title>Re: Convert SQL to DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-SQL-to-DAX/m-p/3631753#M140473</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="659316" data-lia-user-login="TechMG" class="lia-mention lia-mention-user"&gt;TechMG&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please try:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;EVALUATE
ADDCOLUMNS(
    FILTER(
        'Program',
        LOOKUPVALUE(
            'dimuser'[InternalEmailAddress],
            'dimuser'[UserId],
            'userclinicbridge'[UserId]
        ) = userprincipalname()
    ),
    'Program'[ProgramId],
    'Program'[ProgramName],
    LOOKUPVALUE('dimclinic'[ProgramId],'Program'[ProgramId]),
    LOOKUPVALUE('userclinicbridge'[ClinicId],'dimclinic'[ClinicId]),
    "InternalEmailAddress",
    LOOKUPVALUE(
        'dimuser'[InternalEmailAddress],
        'dimuser'[UserId],
        'userclinicbridge'[ClinicId]
    )
)
&lt;/LI-CODE&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Neeko Tang&lt;/P&gt;
&lt;P&gt;If this post  &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution &lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2024 02:18:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-SQL-to-DAX/m-p/3631753#M140473</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-01-11T02:18:41Z</dc:date>
    </item>
    <item>
      <title>Re: Convert SQL to DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-SQL-to-DAX/m-p/3631802#M140475</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your quick response. I have executed the query and getting below error.&lt;/P&gt;&lt;P&gt;Query (13, 5) Too few arguments were passed to the LOOKUPVALUE function. The minimum argument count for the function is 3.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2024 02:47:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-SQL-to-DAX/m-p/3631802#M140475</guid>
      <dc:creator>TechMG</dc:creator>
      <dc:date>2024-01-11T02:47:03Z</dc:date>
    </item>
    <item>
      <title>Re: Convert SQL to DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-SQL-to-DAX/m-p/3632411#M140488</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="659316" data-lia-user-login="TechMG" class="lia-mention lia-mention-user"&gt;TechMG&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm sorry I changed my dax.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Table = FILTER(ADDCOLUMNS(SELECTCOLUMNS('P',"ProgramId",[ProgramId],"ProgramName",[ProgramName]),"InternalEmailAddress",LOOKUPVALUE(
        'dimuser'[InternalEmailAddress],
        'dimuser'[UserId],
        'userclinicbridge'[ClinicId]
    )),[InternalEmailAddress]=userprincipalname())&lt;/LI-CODE&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Neeko Tang&lt;/P&gt;
&lt;P&gt;If this post &lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2024 06:10:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-SQL-to-DAX/m-p/3632411#M140488</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-01-11T06:10:03Z</dc:date>
    </item>
    <item>
      <title>Re: Convert SQL to DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-SQL-to-DAX/m-p/3633520#M140533</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tried the above solution and it is saying Incorrect syntex Table.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2024 14:10:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-SQL-to-DAX/m-p/3633520#M140533</guid>
      <dc:creator>TechMG</dc:creator>
      <dc:date>2024-01-11T14:10:23Z</dc:date>
    </item>
  </channel>
</rss>

