<?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 How to Link Relative Date Slicer with Previous Period Measure in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Link-Relative-Date-Slicer-with-Previous-Period-Measure/m-p/2920313#M95752</link>
    <description>&lt;P&gt;Hiya,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am making some KPI cards, and am wishing to link the target values to the relative date slicer. (weeks, months, etc)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, when I choose "Last 2 months", I would like to get a "Previous Month" target.&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I choose "Last 2 weeks", I would like to get a "Previous Week" target.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I could not figure out how to 'extract' that input as some sort of unit to put in a measure.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Help would be much appreciated!&lt;/P&gt;</description>
    <pubDate>Tue, 22 Nov 2022 03:30:44 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-11-22T03:30:44Z</dc:date>
    <item>
      <title>How to Link Relative Date Slicer with Previous Period Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Link-Relative-Date-Slicer-with-Previous-Period-Measure/m-p/2920313#M95752</link>
      <description>&lt;P&gt;Hiya,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am making some KPI cards, and am wishing to link the target values to the relative date slicer. (weeks, months, etc)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, when I choose "Last 2 months", I would like to get a "Previous Month" target.&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I choose "Last 2 weeks", I would like to get a "Previous Week" target.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I could not figure out how to 'extract' that input as some sort of unit to put in a measure.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Help would be much appreciated!&lt;/P&gt;</description>
      <pubDate>Tue, 22 Nov 2022 03:30:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Link-Relative-Date-Slicer-with-Previous-Period-Measure/m-p/2920313#M95752</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-11-22T03:30:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to Link Relative Date Slicer with Previous Period Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Link-Relative-Date-Slicer-with-Previous-Period-Measure/m-p/2920359#M95754</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , Try measure like &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Last month&amp;nbsp; = &lt;BR /&gt;var _max1 = if(isfiltered('Date'),Min( 'Date'[Date]) , today())&lt;BR /&gt;var _max = eomonth(_max1,-1)&lt;BR /&gt;var _min = eomonth(_max1,-2)+1 &lt;BR /&gt;return&lt;BR /&gt;CALCULATE([net] ,DATESBETWEEN('Date'[Date],_min,_max))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Last week = &lt;BR /&gt;var _max1 = if(isfiltered('Date'),Min( 'Date'[Date]) , today()) -7&lt;BR /&gt;var _max = _max1 - weekday(_max,2)+7&lt;BR /&gt;var _min = _max1 - weekday(_max,2)+1&lt;BR /&gt;return&lt;BR /&gt;CALCULATE([net] ,DATESBETWEEN('Date'[Date],_min,_max))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Nov 2022 04:15:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Link-Relative-Date-Slicer-with-Previous-Period-Measure/m-p/2920359#M95754</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-11-22T04:15:22Z</dc:date>
    </item>
  </channel>
</rss>

