<?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: Get MTD for a selected date (create slicer with MTD , YTD and QTD) in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-MTD-for-a-selected-date-create-slicer-with-MTD-YTD-and-QTD/m-p/3084229#M107675</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="496065" data-lia-user-login="Samarth-Borade" class="lia-mention lia-mention-user"&gt;Samarth-Borade&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can creata a measure and use switch() function.&lt;/P&gt;
&lt;P&gt;e.g&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;SWITCH(TRUE(),MAX([Type])="MTD",CALCULATE(..,DATESMTD(DateTime[DateKey])),MAX([Type])="YTD",CALCULATE(..,DATESYTD(DateTime[DateKey])),MAX([Type])="QTD",CALCULATE(...,DATESQTD(DateTime[DateKey]))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards!&lt;/P&gt;
&lt;P&gt;Yolo Zhu&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;I&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/I&gt;, then please consider&amp;nbsp;&lt;I&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/I&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 17 Feb 2023 02:00:11 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-02-17T02:00:11Z</dc:date>
    <item>
      <title>Get MTD for a selected date (create slicer with MTD , YTD and QTD)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-MTD-for-a-selected-date-create-slicer-with-MTD-YTD-and-QTD/m-p/3081962#M107471</link>
      <description>&lt;P&gt;If I select the date in date slicer 13/02/2023 then if i click on MTD option it will show me data in visuals from range 13/01/2023 to 13/02/2023, that is from selected date to the same date of previous month . Same for YTD .&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can some one help me here !&amp;nbsp;&lt;/P&gt;&lt;P&gt;basically i want two slicer one is Date slicer and other is selection slicer conatining MTD,YTD,QTD.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2023 17:43:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-MTD-for-a-selected-date-create-slicer-with-MTD-YTD-and-QTD/m-p/3081962#M107471</guid>
      <dc:creator>Samarth-Borade</dc:creator>
      <dc:date>2023-02-15T17:43:48Z</dc:date>
    </item>
    <item>
      <title>Re: Get MTD for a selected date (create slicer with MTD , YTD and QTD)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-MTD-for-a-selected-date-create-slicer-with-MTD-YTD-and-QTD/m-p/3084229#M107675</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="496065" data-lia-user-login="Samarth-Borade" class="lia-mention lia-mention-user"&gt;Samarth-Borade&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can creata a measure and use switch() function.&lt;/P&gt;
&lt;P&gt;e.g&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;SWITCH(TRUE(),MAX([Type])="MTD",CALCULATE(..,DATESMTD(DateTime[DateKey])),MAX([Type])="YTD",CALCULATE(..,DATESYTD(DateTime[DateKey])),MAX([Type])="QTD",CALCULATE(...,DATESQTD(DateTime[DateKey]))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards!&lt;/P&gt;
&lt;P&gt;Yolo Zhu&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;I&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/I&gt;, then please consider&amp;nbsp;&lt;I&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/I&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2023 02:00:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Get-MTD-for-a-selected-date-create-slicer-with-MTD-YTD-and-QTD/m-p/3084229#M107675</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-02-17T02:00:11Z</dc:date>
    </item>
  </channel>
</rss>

