<?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: Dax formula to calculate except for the particular date range , I need all remaining sales in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-formula-to-calculate-except-for-the-particular-date-range-I/m-p/2296574#M56617</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;Since you have a measure now for the undesired range we can just calculate ALL sales and subtract your measure from that:&lt;BR /&gt;&lt;BR /&gt;[All sales] = CALCULATE(SUM(Table[Sales]),ALL(Table))&lt;BR /&gt;[All but range]=[All sales]- [&lt;SPAN&gt;last 2 weeks sales]&lt;BR /&gt;&lt;BR /&gt;I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 22 Jan 2022 13:19:29 GMT</pubDate>
    <dc:creator>ValtteriN</dc:creator>
    <dc:date>2022-01-22T13:19:29Z</dc:date>
    <item>
      <title>Dax formula to calculate except for the particular date range , I need all remaining sales</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-formula-to-calculate-except-for-the-particular-date-range-I/m-p/2296525#M56613</link>
      <description>&lt;P&gt;last 2 weeks uncleared sales =&lt;BR /&gt;&lt;BR /&gt;VAR &lt;STRONG&gt;Date_Range&lt;/STRONG&gt;= DATESINPERIOD(Date_Table[Date], LASTDATE(Date_Table[Date]) -WEEKDAY(LASTDATE(Date_Table[Date]),2),-14,DAY)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Return&lt;BR /&gt;&lt;BR /&gt;CALCULATE(&lt;BR /&gt;CONCATENATEX(&lt;BR /&gt;VALUES(TABLE[Sales item]),Table[sales item],UNICHAR(10)),&lt;BR /&gt;&lt;STRONG&gt;Date_Ranage&lt;/STRONG&gt;&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;it is giving the output for last 2 weeks sales. but I need sales for all the dates except the given date_range.&lt;/P&gt;&lt;P&gt;ex: consider in the sales table I have sales data from 1st Jan to 22nd Jan&lt;/P&gt;&lt;P&gt;my VAR Date_Range expression gives 3rd Jan to 16th January.&lt;BR /&gt;so I need output as&lt;BR /&gt;**(1st jan to 2jan sales)+( 17th Jan to 22nd Jan)**&lt;BR /&gt;i.e remaining days sales except for the given &lt;STRONG&gt;date_range&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;please help me with this. thanks in advance.&lt;/P&gt;</description>
      <pubDate>Sat, 22 Jan 2022 11:18:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-formula-to-calculate-except-for-the-particular-date-range-I/m-p/2296525#M56613</guid>
      <dc:creator>sharath123</dc:creator>
      <dc:date>2022-01-22T11:18:34Z</dc:date>
    </item>
    <item>
      <title>Re: Dax formula to calculate except for the particular date range , I need all remaining sales</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-formula-to-calculate-except-for-the-particular-date-range-I/m-p/2296574#M56617</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;Since you have a measure now for the undesired range we can just calculate ALL sales and subtract your measure from that:&lt;BR /&gt;&lt;BR /&gt;[All sales] = CALCULATE(SUM(Table[Sales]),ALL(Table))&lt;BR /&gt;[All but range]=[All sales]- [&lt;SPAN&gt;last 2 weeks sales]&lt;BR /&gt;&lt;BR /&gt;I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Jan 2022 13:19:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-formula-to-calculate-except-for-the-particular-date-range-I/m-p/2296574#M56617</guid>
      <dc:creator>ValtteriN</dc:creator>
      <dc:date>2022-01-22T13:19:29Z</dc:date>
    </item>
    <item>
      <title>Re: Dax formula to calculate except for the particular date range , I need all remaining sales</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-formula-to-calculate-except-for-the-particular-date-range-I/m-p/2302526#M56896</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="334273" data-lia-user-login="sharath123" class="lia-mention lia-mention-user"&gt;sharath123&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;According to your description, I create a sample.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;I modify your formula like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;last 2 weeks uncleared sales =
VAR Date_Range =
    DATESINPERIOD (
        Date_Table[Date],
        LASTDATE ( Date_Table[Date] ) - WEEKDAY ( LASTDATE ( Date_Table[Date] ), 2 ),
        -14,
        DAY
    )
RETURN
    CALCULATE (
        CONCATENATEX (
            VALUES ( 'Table'[Sales item] ),
            'Table'[sales item],
            UNICHAR ( 10 )
        ),
        FILTER ( ALL ( 'Table' ), NOT ( 'Table'[Date] IN ( Date_Range ) ) )
    )
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then get the expected result. The red line marked is the&amp;nbsp;&lt;SPAN&gt;1st jan to 2nd jan sales, the green line marked is the&amp;nbsp;17th jan to 22th jan sales.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I attach my sample below for reference.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Community Support Team _ kalyj&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jan 2022 08:04:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-formula-to-calculate-except-for-the-particular-date-range-I/m-p/2302526#M56896</guid>
      <dc:creator>v-yanjiang-msft</dc:creator>
      <dc:date>2022-01-26T08:04:00Z</dc:date>
    </item>
  </channel>
</rss>

