<?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: Sum a calculation made on each line in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-a-calculation-made-on-each-line/m-p/1116240#M16277</link>
    <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you share the sample data so that we can validate the logic?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 24 May 2020 09:01:39 GMT</pubDate>
    <dc:creator>nandukrishnavs</dc:creator>
    <dc:date>2020-05-24T09:01:39Z</dc:date>
    <item>
      <title>Sum a calculation made on each line</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-a-calculation-made-on-each-line/m-p/1116231#M16275</link>
      <description>&lt;P&gt;HEllo everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a simple problem I can't seem to figure out on my own.&lt;/P&gt;&lt;P&gt;I have a table of clients, with a column indicating the date of first purchase for a specific product line.&lt;/P&gt;&lt;P&gt;I have a date filter.&lt;/P&gt;&lt;P&gt;I want when i change the date filter, to evaluate on each line if the first purchase was in the time range selected in the filter, if so count 1 for that line, and sum the 1 to get a count of clients who made a purchase in that time range.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In SQL I would do that:&lt;/P&gt;&lt;P&gt;SUM(CASE WHEN date_first_purchase BETWEEN first_date AND last_date THEN 1 ELSE 0 END)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to do that in DAX?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;</description>
      <pubDate>Sun, 24 May 2020 08:23:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-a-calculation-made-on-each-line/m-p/1116231#M16275</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-24T08:23:06Z</dc:date>
    </item>
    <item>
      <title>Re: Sum a calculation made on each line</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-a-calculation-made-on-each-line/m-p/1116240#M16277</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you share the sample data so that we can validate the logic?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 24 May 2020 09:01:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-a-calculation-made-on-each-line/m-p/1116240#M16277</guid>
      <dc:creator>nandukrishnavs</dc:creator>
      <dc:date>2020-05-24T09:01:39Z</dc:date>
    </item>
    <item>
      <title>Re: Sum a calculation made on each line</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-a-calculation-made-on-each-line/m-p/1116491#M16294</link>
      <description>&lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490&lt;/A&gt;</description>
      <pubDate>Sun, 24 May 2020 12:18:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-a-calculation-made-on-each-line/m-p/1116491#M16294</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-24T12:18:40Z</dc:date>
    </item>
    <item>
      <title>Re: Sum a calculation made on each line</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-a-calculation-made-on-each-line/m-p/1130498#M16770</link>
      <description>&lt;P&gt;I reread the documentation and achieved the desired results with a SUMX and CALCULATE with a little tweaking. Thanks anyway!&lt;/P&gt;</description>
      <pubDate>Sat, 30 May 2020 07:32:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-a-calculation-made-on-each-line/m-p/1130498#M16770</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-30T07:32:21Z</dc:date>
    </item>
  </channel>
</rss>

