<?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: Available running time by monthly days. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Available-running-time-by-monthly-days/m-p/2766565#M85943</link>
    <description>&lt;P&gt;If your measure will be used in a visual which uses columns from your date table then you can calculate the number of days in the given month with COUNTROWS('Date')&lt;/P&gt;</description>
    <pubDate>Wed, 14 Sep 2022 08:32:54 GMT</pubDate>
    <dc:creator>johnt75</dc:creator>
    <dc:date>2022-09-14T08:32:54Z</dc:date>
    <item>
      <title>Available running time by monthly days.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Available-running-time-by-monthly-days/m-p/2765309#M85872</link>
      <description>&lt;P&gt;Hi!&lt;BR /&gt;I'm trying to calculate the availability of service on DAX, I was able to do it by adding the running time (minutes), deducting 43200 and dividing by 43200 (30 days). It gives me the availability for 30 days only.&lt;BR /&gt;&lt;BR /&gt;What I need is to be able to calculate the availability monthly, as example.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;February has 28 days, so it would be running time -40320/4320.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Is there any way I can get the sum of the running time (in minutes), deduct the accordingly month time (in minutes) and divide by it?&lt;BR /&gt;Or if you have any other way to calculate the service availability based on the monthly time (in minutes).&lt;BR /&gt;&lt;BR /&gt;Thank you very much&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2022 20:07:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Available-running-time-by-monthly-days/m-p/2765309#M85872</guid>
      <dc:creator>Azucrinador</dc:creator>
      <dc:date>2022-09-13T20:07:18Z</dc:date>
    </item>
    <item>
      <title>Re: Available running time by monthly days.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Available-running-time-by-monthly-days/m-p/2766565#M85943</link>
      <description>&lt;P&gt;If your measure will be used in a visual which uses columns from your date table then you can calculate the number of days in the given month with COUNTROWS('Date')&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 08:32:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Available-running-time-by-monthly-days/m-p/2766565#M85943</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2022-09-14T08:32:54Z</dc:date>
    </item>
    <item>
      <title>Re: Available running time by monthly days.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Available-running-time-by-monthly-days/m-p/2773178#M86411</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi &lt;/SPAN&gt;&lt;SPAN&gt;@&lt;/SPAN&gt;&lt;A href="https://community.powerbi.com/t5/user/viewprofilepage/user-id/441379" target="_blank"&gt;Azucrinador&lt;/A&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;According to your description, you want to calculate the number of minutes for each month that is available divided by thirty days ,right? Here are my steps you can follow as a solution.&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;(1)&lt;/SPAN&gt;&lt;SPAN&gt;We can create a table and get a date table from January to December 2022 as test data.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Table = CALENDAR(DATE(2022,1,1),DATE(2022,12,31))&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;(2)&lt;/SPAN&gt;&lt;SPAN&gt; Renders the [Date] column in the format of [Date Hierarchy] and filters the month.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;(3) We can create &amp;nbsp;measures.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Running Time =

var _minmonth=MIN('Table'[Date])

var _days=DATEDIFF(_minmonth,EOMONTH(_minmonth,0),DAY)+1

return

-_days*24*60/43200&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;(4)&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Then the result is as follows.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If this method does not meet your needs, you can provide us with detailed input and output examples in tabular form so that we can better solve the problem for you.&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Neeko Tang&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If this post&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt;, then please consider&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN&gt;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 10:24:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Available-running-time-by-monthly-days/m-p/2773178#M86411</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-16T10:24:21Z</dc:date>
    </item>
    <item>
      <title>Re: Available running time by monthly days.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Available-running-time-by-monthly-days/m-p/2774351#M86524</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;,&amp;nbsp;thanks for the reply. Actually, what I need is to divide the unavailable time by days on a month. Example: 20 minutes unavailable, considering that Februrary has 28 days, it will be divided by 28 days.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 18:40:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Available-running-time-by-monthly-days/m-p/2774351#M86524</guid>
      <dc:creator>Azucrinador</dc:creator>
      <dc:date>2022-09-16T18:40:21Z</dc:date>
    </item>
    <item>
      <title>Re: Available running time by monthly days.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Available-running-time-by-monthly-days/m-p/2777079#M86720</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="441379" data-lia-user-login="Azucrinador" class="lia-mention lia-mention-user"&gt;Azucrinador&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to your description, I made changes. Here are my steps you can follow as a solution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(1)This is my test data. I created a table from January to December for the year 2022, containing the unavailable time and date columns for each day of the month.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&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;(2)We can create&amp;nbsp; a measure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Running Time =

var _minmonth=MIN('Table'[Date])

var _days=DATEDIFF(_minmonth,EOMONTH(_minmonth,0),DAY)+1

var un_time=SUM('Table'[Unavailable time])

return

DIVIDE(un_time,_days,0)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(3)Then the result is as follows.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;If this method does not meet your needs, you can provide us with detailed input and output examples in tabular form so that we can better solve the problem for you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Neeko Tang&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2022 08:50:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Available-running-time-by-monthly-days/m-p/2777079#M86720</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-19T08:50:50Z</dc:date>
    </item>
  </channel>
</rss>

