<?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: Summarize between selected dates from slicer in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Summarize-between-selected-dates-from-slicer/m-p/3160599#M113491</link>
    <description>&lt;P&gt;And for the measure "Afkast - Previous Month Afkast" it is&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Afkast - Previous month afkast = 
        CALCULATE(SUM('FactAfkast'[Afkast eksl. FX]),PREVIOUSMONTH('DimDate'[Date]))&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 29 Mar 2023 10:50:01 GMT</pubDate>
    <dc:creator>Solle</dc:creator>
    <dc:date>2023-03-29T10:50:01Z</dc:date>
    <item>
      <title>Summarize between selected dates from slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Summarize-between-selected-dates-from-slicer/m-p/3160521#M113481</link>
      <description>&lt;P&gt;Hi All,&lt;BR /&gt;&lt;BR /&gt;I have a measure named "Afkast - Month Afkast" which generates each month return. Then I have a slicer which is using "between" as the style. What I want to accomplish is to generate the sum of monthly returns between two dates selected from the slicer.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I have tried the below code, but this just gives me from the start of the dates till the selected max value in the data slicer. So it is ignoring the start date in the slicer.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Afkast - Period Afkast = 
VAR v2 = 
SUMMARIZE(
    FILTER(
        'DimDate',
        'DimDate'[Date]&amp;gt;=MIN(DimDate[Date]) &amp;amp;&amp;amp; 'DimDate'[Date]&amp;lt;= MAX('DimDate'[Date])
        ),
        'DimDate'[Date],"Sum",[Afkast - Month afkast])

RETURN
SUMX(v2,[sum])&lt;/LI-CODE&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;Does anyone know how to accomplish this? Unfortunately I have to have month returns as a measure due to the data structure.&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Solle&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 29 Mar 2023 10:07:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Summarize-between-selected-dates-from-slicer/m-p/3160521#M113481</guid>
      <dc:creator>Solle</dc:creator>
      <dc:date>2023-03-29T10:07:58Z</dc:date>
    </item>
    <item>
      <title>Re: Summarize between selected dates from slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Summarize-between-selected-dates-from-slicer/m-p/3160560#M113486</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="371558" data-lia-user-login="Solle" class="lia-mention lia-mention-user"&gt;Solle&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;What is the dax for&amp;nbsp;[Afkast - Month afkast]?&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2023 10:29:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Summarize-between-selected-dates-from-slicer/m-p/3160560#M113486</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-03-29T10:29:33Z</dc:date>
    </item>
    <item>
      <title>Re: Summarize between selected dates from slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Summarize-between-selected-dates-from-slicer/m-p/3160597#M113490</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;The dax for that measure is&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Afkast - Month afkast = 
    IF(
        MONTH(SELECTEDVALUE('DimDate'[Date]))=1,
            SUM('FactAfkast'[Afkast eksl. FX]),
            SUM(FactAfkast[Afkast eksl. FX])-[Afkast - Previous month afkast])&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Let me know if you have any additional questions.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Solle&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2023 10:49:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Summarize-between-selected-dates-from-slicer/m-p/3160597#M113490</guid>
      <dc:creator>Solle</dc:creator>
      <dc:date>2023-03-29T10:49:06Z</dc:date>
    </item>
    <item>
      <title>Re: Summarize between selected dates from slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Summarize-between-selected-dates-from-slicer/m-p/3160599#M113491</link>
      <description>&lt;P&gt;And for the measure "Afkast - Previous Month Afkast" it is&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Afkast - Previous month afkast = 
        CALCULATE(SUM('FactAfkast'[Afkast eksl. FX]),PREVIOUSMONTH('DimDate'[Date]))&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 29 Mar 2023 10:50:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Summarize-between-selected-dates-from-slicer/m-p/3160599#M113491</guid>
      <dc:creator>Solle</dc:creator>
      <dc:date>2023-03-29T10:50:01Z</dc:date>
    </item>
  </channel>
</rss>

