<?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 Is it possible to transform such Oracle SQL function into DAX in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Is-it-possible-to-transform-such-Oracle-SQL-function-into-DAX/m-p/2591868#M74683</link>
    <description>&lt;P&gt;hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to transform the following Oracle SQL function into DAX but without any success. Could you please help me how to solve it? The functionality of this field should be like that you input account value into&amp;nbsp;${account} and then it shows you relevant result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SELECT&lt;/P&gt;&lt;P&gt;sum(CASE&lt;BR /&gt;WHEN "accountMD" = ${account} THEN -1*"amount"&lt;BR /&gt;ELSE "amount"&lt;BR /&gt;END&lt;BR /&gt;) OVER (PARTITION BY "businessPartnerNumber") AS SUM&lt;/P&gt;&lt;P&gt;FROM Table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;</description>
    <pubDate>Tue, 21 Jun 2022 09:41:26 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-06-21T09:41:26Z</dc:date>
    <item>
      <title>Is it possible to transform such Oracle SQL function into DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Is-it-possible-to-transform-such-Oracle-SQL-function-into-DAX/m-p/2591868#M74683</link>
      <description>&lt;P&gt;hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to transform the following Oracle SQL function into DAX but without any success. Could you please help me how to solve it? The functionality of this field should be like that you input account value into&amp;nbsp;${account} and then it shows you relevant result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SELECT&lt;/P&gt;&lt;P&gt;sum(CASE&lt;BR /&gt;WHEN "accountMD" = ${account} THEN -1*"amount"&lt;BR /&gt;ELSE "amount"&lt;BR /&gt;END&lt;BR /&gt;) OVER (PARTITION BY "businessPartnerNumber") AS SUM&lt;/P&gt;&lt;P&gt;FROM Table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jun 2022 09:41:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Is-it-possible-to-transform-such-Oracle-SQL-function-into-DAX/m-p/2591868#M74683</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-21T09:41:26Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to transform such Oracle SQL function into DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Is-it-possible-to-transform-such-Oracle-SQL-function-into-DAX/m-p/2599136#M75076</link>
      <description>&lt;P&gt;Hi&amp;nbsp; Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I created some data:&lt;/P&gt;
&lt;P&gt;Table:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Table2:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Here are the steps you can follow：&lt;/P&gt;
&lt;P&gt;1. Use [account] of Table2 as a slicer.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;2. Create measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;if_Measure =
var _select=SELECTEDVALUE('Table 2'[account])
return
IF(
    MAX('Table'[accountMD])=_select,-1*MAX('Table'[amount]),MAX('Table'[amount]))&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;SUM =
SUMX(FILTER(ALL('Table'),'Table'[businessPartnerNumber]=MAX('Table'[businessPartnerNumber])),[if_Measure])&lt;/LI-CODE&gt;
&lt;P&gt;3. Result:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Liu Yang&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;Accept it as the solution&lt;/EM&gt; to help the other members find it more quickly&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jun 2022 02:18:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Is-it-possible-to-transform-such-Oracle-SQL-function-into-DAX/m-p/2599136#M75076</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-24T02:18:34Z</dc:date>
    </item>
  </channel>
</rss>

