<?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 by date with condition in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-by-date-with-condition/m-p/2763639#M85738</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Thank you for your feedback.&lt;/P&gt;
&lt;P&gt;If you only need to have a Month Slicer, I suggest creating a Month Column when creating a Calendar table. I added a Month column into a calendar table in the attached file.&lt;/P&gt;
&lt;P&gt;Please check the below picture and the attached file whether it suits your requirement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 13 Sep 2022 07:57:39 GMT</pubDate>
    <dc:creator>Jihwan_Kim</dc:creator>
    <dc:date>2022-09-13T07:57:39Z</dc:date>
    <item>
      <title>Sum by date with condition</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-by-date-with-condition/m-p/2763014#M85701</link>
      <description>&lt;P&gt;Hi I am new to power BI and would like to seek for the following advice.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Item&lt;/TD&gt;&lt;TD&gt;Sales&lt;/TD&gt;&lt;TD&gt;Date&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Apple&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;01/01/2022&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Orange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&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My aim is to have 2 equation.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Equation 1: Sum up the sales (all item) for that month and 2 month after the selected month.&lt;/P&gt;&lt;P&gt;- for example if I select 1 Jan 2022, the result will be sales 1Jan22 - 31Mar22, which is 155&lt;/P&gt;&lt;P&gt;Remarks: the solution come to my mind is to sum up data from start date + 90days, but I am not sure how to make this equation working.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Equaton 2: Same criteria as equation 1 but for specific item&lt;/P&gt;&lt;P&gt;- for example, if I select 1 Jan 2022, the result will be sales for Apple from 1Jan22 - 31Mar22, which is 50&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am currently using a timeline slicer, not sure if it works as timeline covered a period of time, if the above equation can only works on date picker (single date selection), please let me know.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2022 02:48:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-by-date-with-condition/m-p/2763014#M85701</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-13T02:48:43Z</dc:date>
    </item>
    <item>
      <title>Re: Sum by date with condition</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-by-date-with-condition/m-p/2763077#M85706</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Please check the below picture and the attached pbix file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Expected measure: = 
CALCULATE (
    SUM ( Data[Sales] ),
    DATESINPERIOD ( 'Calendar'[Date], LASTDATE ( 'Calendar'[Date] ), 3, MONTH )
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Only apple expected measure: = 
CALCULATE ( [Expected measure:], 'Item'[Item] = "Apple" )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2022 03:21:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-by-date-with-condition/m-p/2763077#M85706</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2022-09-13T03:21:40Z</dc:date>
    </item>
    <item>
      <title>Re: Sum by date with condition</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-by-date-with-condition/m-p/2763301#M85715</link>
      <description>&lt;P&gt;Hi Kim,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;May you include a month filter as exmaple? I can only show 1 result when a date picked instead of a completed list.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2022 06:29:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-by-date-with-condition/m-p/2763301#M85715</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-13T06:29:55Z</dc:date>
    </item>
    <item>
      <title>Re: Sum by date with condition</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-by-date-with-condition/m-p/2763639#M85738</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Thank you for your feedback.&lt;/P&gt;
&lt;P&gt;If you only need to have a Month Slicer, I suggest creating a Month Column when creating a Calendar table. I added a Month column into a calendar table in the attached file.&lt;/P&gt;
&lt;P&gt;Please check the below picture and the attached file whether it suits your requirement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2022 07:57:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Sum-by-date-with-condition/m-p/2763639#M85738</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2022-09-13T07:57:39Z</dc:date>
    </item>
  </channel>
</rss>

