<?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: How to convert SQL case statement to dax in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-convert-SQL-case-statement-to-dax/m-p/3215296#M117375</link>
    <description>&lt;P&gt;Thank you for the reply. Somehow the last bit which is&lt;/P&gt;&lt;PRE&gt;SUM('Table'[XYZ])&lt;/PRE&gt;&lt;P&gt;is actually a measure and DAX is not picking up with this syntax and also coming with this error&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;so incase if you can help me further thank you&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 02 May 2023 09:29:33 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-05-02T09:29:33Z</dc:date>
    <item>
      <title>How to convert SQL case statement to dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-convert-SQL-case-statement-to-dax/m-p/3214840#M117356</link>
      <description>&lt;P&gt;case&lt;BR /&gt;when (COALESCE(sum(ABC),0) - COALESCE(sum(ABCD),0)) &amp;lt; 0 then 0&lt;BR /&gt;else (COALESCE(sum(ABC),0) - COALESCE(sum(ABCD),0)) / sum(XYZ)&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2023 04:41:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-convert-SQL-case-statement-to-dax/m-p/3214840#M117356</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-05-02T04:41:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert SQL case statement to dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-convert-SQL-case-statement-to-dax/m-p/3215051#M117366</link>
      <description>&lt;P&gt;hello please try&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;IF(
    CALCULATE(SUM('Table'[ABC])) - CALCULATE(SUM('Table'[ABCD])) &amp;lt; 0,
    0,
    DIVIDE(
        CALCULATE(SUM('Table'[ABC])) - CALCULATE(SUM('Table'[ABCD])),
        SUM('Table'[XYZ])
    )
)&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 02 May 2023 07:36:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-convert-SQL-case-statement-to-dax/m-p/3215051#M117366</guid>
      <dc:creator>eliasayyy</dc:creator>
      <dc:date>2023-05-02T07:36:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert SQL case statement to dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-convert-SQL-case-statement-to-dax/m-p/3215296#M117375</link>
      <description>&lt;P&gt;Thank you for the reply. Somehow the last bit which is&lt;/P&gt;&lt;PRE&gt;SUM('Table'[XYZ])&lt;/PRE&gt;&lt;P&gt;is actually a measure and DAX is not picking up with this syntax and also coming with this error&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;so incase if you can help me further thank you&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2023 09:29:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-convert-SQL-case-statement-to-dax/m-p/3215296#M117375</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-05-02T09:29:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert SQL case statement to dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-convert-SQL-case-statement-to-dax/m-p/3215546#M117391</link>
      <description>&lt;P&gt;can you please show me the full measure how you wrote it&lt;BR /&gt;&lt;BR /&gt;or please try&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Measure = 
VAR result = SUM('Table'[ABC]) - SUM('Table'[ABCD])
RETURN
IF(
    result &amp;lt; 0,
    0,
    DIVIDE(
        result,
        SUM('Table'[XYZ]),
        0 
    )
)&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 02 May 2023 11:49:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-convert-SQL-case-statement-to-dax/m-p/3215546#M117391</guid>
      <dc:creator>eliasayyy</dc:creator>
      <dc:date>2023-05-02T11:49:21Z</dc:date>
    </item>
  </channel>
</rss>

