<?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: Total No of Days Spent month wise breakup using Time periods in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-No-of-Days-Spent-month-wise-breakup-using-Time-periods/m-p/2107424#M48163</link>
    <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Thanks alot for your response. But if you please go thru the post again, you will come to know my exact need.&lt;BR /&gt;if u see, task2 in the screenshot, it starts on&amp;nbsp; Sep-03-201 &amp;amp; ends on Oct -03 where total days will be 30 days. but,&amp;nbsp;When i select time period as Current Month, it should calculate total days from start date to month end of current month and the remaining days (2Days)should be covered under next month i.e. Oct.&amp;nbsp;&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks ,&lt;/P&gt;&lt;P&gt;Srinivas K&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
    <pubDate>Thu, 30 Sep 2021 06:53:41 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-09-30T06:53:41Z</dc:date>
    <item>
      <title>Total No of Days Spent month wise breakup using Time periods</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-No-of-Days-Spent-month-wise-breakup-using-Time-periods/m-p/2107168#M48154</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I'm a newbee. I have a situation where i need to calculate the total no. of days spent&amp;nbsp;on each task on monthly basis.&lt;BR /&gt;I have time periods in a slicer with values "Current Month", "Prev Month", "Last 3 Months", "Next Month" &amp;amp; Next 3 Months"&lt;/P&gt;&lt;P&gt;Based on the time period selected, i want to show the total no of days spent on a task.&lt;/P&gt;&lt;P&gt;Note: My Date Table is built on Start Date.&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;It will be really helpful with a sample code snippet or any link.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in Advance&lt;/P&gt;&lt;P&gt;Srinivas K&lt;/P&gt;</description>
      <pubDate>Thu, 30 Sep 2021 04:54:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-No-of-Days-Spent-month-wise-breakup-using-Time-periods/m-p/2107168#M48154</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-09-30T04:54:13Z</dc:date>
    </item>
    <item>
      <title>Re: Total No of Days Spent month wise breakup using Time periods</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-No-of-Days-Spent-month-wise-breakup-using-Time-periods/m-p/2107216#M48155</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt; , Try measures like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This Month= &lt;BR /&gt;var _min1 = eomonth(today(),-1)+1&lt;BR /&gt;var _max1 = eomonth(today(),0)&lt;BR /&gt;var _min = if(min([Task Start Date]) &amp;gt;= _min1, min([Start Date]) , _min1) &lt;BR /&gt;var _min = if(Max([Task End Date]) &amp;lt;= _max1, Max([Task End Date]) , _max1) &lt;BR /&gt;return &lt;BR /&gt;datediff(_min,_max, Day)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Last Month= &lt;BR /&gt;var _min1 = eomonth(today(),-2)+1&lt;BR /&gt;var _max1 = eomonth(today(),-1)&lt;BR /&gt;var _min = if(min([Task Start Date]) &amp;gt;= _min1, min([Start Date]) , _min1) &lt;BR /&gt;var _min = if(Max([Task End Date]) &amp;lt;= _max1, Max([Task End Date]) , _max1) &lt;BR /&gt;return &lt;BR /&gt;datediff(_min,_max, Day)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Last 3 Month= // Use -4 , -1 in place of -3 and 0 if needed &lt;BR /&gt;var _min1 = eomonth(today(),-3)+1 &lt;BR /&gt;var _max1 = eomonth(today(),0)&lt;BR /&gt;var _min = if(min([Task Start Date]) &amp;gt;= _min1, min([Start Date]) , _min1) &lt;BR /&gt;var _min = if(Max([Task End Date]) &amp;lt;= _max1, Max([Task End Date]) , _max1) &lt;BR /&gt;return &lt;BR /&gt;datediff(_min,_max, Day)&lt;/P&gt;</description>
      <pubDate>Thu, 30 Sep 2021 05:15:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-No-of-Days-Spent-month-wise-breakup-using-Time-periods/m-p/2107216#M48155</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2021-09-30T05:15:18Z</dc:date>
    </item>
    <item>
      <title>Re: Total No of Days Spent month wise breakup using Time periods</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-No-of-Days-Spent-month-wise-breakup-using-Time-periods/m-p/2107424#M48163</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Thanks alot for your response. But if you please go thru the post again, you will come to know my exact need.&lt;BR /&gt;if u see, task2 in the screenshot, it starts on&amp;nbsp; Sep-03-201 &amp;amp; ends on Oct -03 where total days will be 30 days. but,&amp;nbsp;When i select time period as Current Month, it should calculate total days from start date to month end of current month and the remaining days (2Days)should be covered under next month i.e. Oct.&amp;nbsp;&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks ,&lt;/P&gt;&lt;P&gt;Srinivas K&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Thu, 30 Sep 2021 06:53:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-No-of-Days-Spent-month-wise-breakup-using-Time-periods/m-p/2107424#M48163</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-09-30T06:53:41Z</dc:date>
    </item>
    <item>
      <title>Re: Total No of Days Spent month wise breakup using Time periods</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-No-of-Days-Spent-month-wise-breakup-using-Time-periods/m-p/2107569#M48173</link>
      <description>&lt;P&gt;Please ignore the 2nd Image and consider this&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Sep 2021 07:57:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Total-No-of-Days-Spent-month-wise-breakup-using-Time-periods/m-p/2107569#M48173</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-09-30T07:57:38Z</dc:date>
    </item>
  </channel>
</rss>

