<?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: Calculate stock Number of current contracts per month with a visual table. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-stock-Number-of-current-contracts-per-month-with-a/m-p/2766781#M85960</link>
    <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for reaching out to us.&lt;/P&gt;
&lt;P&gt;&amp;gt;&amp;gt;&lt;SPAN&gt;But how can I Calculate stock Number of current contracts per month&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;please try this measure,&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;measure =
CALCULATE (
    COUNTROWS ( Data ),
    FILTER (
        Data,
        [Contract &amp;gt;4 hours] = 1
            &amp;amp;&amp;amp; YEAR ( Data[date] ) = YEAR ( MIN ( Dimdate[Date] ) )
            &amp;amp;&amp;amp; MONTH ( Data[date] ) = MONTH ( MIN ( Dimdate[Date] ) )
    )
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Community Support Team _Tang&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;</description>
    <pubDate>Wed, 14 Sep 2022 09:33:26 GMT</pubDate>
    <dc:creator>v-xiaotang</dc:creator>
    <dc:date>2022-09-14T09:33:26Z</dc:date>
    <item>
      <title>Calculate stock Number of current contracts per month with a visual table.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-stock-Number-of-current-contracts-per-month-with-a/m-p/2754562#M85100</link>
      <description>&lt;P&gt;I would like to know how to calculate the number of current contracts of a customer with a visual table. I have made a copy of the table on the image below. This table is a filtered table. But with this copy, the dax formula does just fine. Only I don't know how to get this table in the formula.The calculation to count the contracts I have:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Number of current contracts per month =&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;VAR MinDatum2 = MAX(Dimdate_end[Date])&lt;/P&gt;&lt;P&gt;VAR MinDatum3 =MIN(Dimdate_end[Date])&lt;/P&gt;&lt;P&gt;RETURN&lt;/P&gt;&lt;P&gt;CALCULATE(&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; COUNTROWS('Tabel (2)'),&lt;BR /&gt;&amp;nbsp; &amp;nbsp; Dimdate_end[Date] &amp;gt;= MinDatum3 ,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; Dimdate[Date] &amp;lt;= MinDatum2&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; )&lt;BR /&gt;&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I would like to use the table on the picture for my calculation. I probably have to build a visual table for this because the table on the picture is filtered. This table normally consists of 400 records. Because I use an earlier function to calculate the sum of hours of a current contract in the data. An index is placed on it and at the lowest in index is the sum of the number of hours of the contract. I use that to determine the contract.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;To determine this I use the following dax formula:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Contract &amp;gt;4 hours =&lt;/STRONG&gt; If(Data[Index traject] = 1 &amp;amp;&amp;amp;&lt;BR /&gt;Data[Traject contract hours] &amp;gt;= 4,1,0)&lt;BR /&gt;&lt;BR /&gt;But how can I Calculate stock Number of current contracts per month with a visual table?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2022 07:35:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-stock-Number-of-current-contracts-per-month-with-a/m-p/2754562#M85100</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-08T07:35:28Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate stock Number of current contracts per month with a visual table.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-stock-Number-of-current-contracts-per-month-with-a/m-p/2754634#M85110</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , refer if one the approach can help &lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-divide-distribute-values-between-start-date-or-end-date/ba-p/1503785" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/How-to-divide-distribute-values-between-start-date-or-end-date/ba-p/1503785&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Between Dates - Dates between &lt;BR /&gt;Tables way &lt;BR /&gt;&lt;A href="https://amitchandak.medium.com/dax-get-all-dates-between-the-start-and-end-date-8f3dac4ff90b" target="_blank"&gt;https://amitchandak.medium.com/dax-get-all-dates-between-the-start-and-end-date-8f3dac4ff90b&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://amitchandak.medium.com/power-query-get-all-dates-between-the-start-and-end-date-9ad6a84cf5f2" target="_blank"&gt;https://amitchandak.medium.com/power-query-get-all-dates-between-the-start-and-end-date-9ad6a84cf5f2&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2022 08:12:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-stock-Number-of-current-contracts-per-month-with-a/m-p/2754634#M85110</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-09-08T08:12:35Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate stock Number of current contracts per month with a visual table.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-stock-Number-of-current-contracts-per-month-with-a/m-p/2754672#M85114</link>
      <description>&lt;P&gt;Hi there.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To me, it's not really clear what it is you want. Can you please simplify your question? Thanks. And please always remember that a picture is worth a thousand words &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2022 08:28:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-stock-Number-of-current-contracts-per-month-with-a/m-p/2754672#M85114</guid>
      <dc:creator>daXtreme</dc:creator>
      <dc:date>2022-09-08T08:28:11Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate stock Number of current contracts per month with a visual table.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-stock-Number-of-current-contracts-per-month-with-a/m-p/2766781#M85960</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for reaching out to us.&lt;/P&gt;
&lt;P&gt;&amp;gt;&amp;gt;&lt;SPAN&gt;But how can I Calculate stock Number of current contracts per month&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;please try this measure,&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;measure =
CALCULATE (
    COUNTROWS ( Data ),
    FILTER (
        Data,
        [Contract &amp;gt;4 hours] = 1
            &amp;amp;&amp;amp; YEAR ( Data[date] ) = YEAR ( MIN ( Dimdate[Date] ) )
            &amp;amp;&amp;amp; MONTH ( Data[date] ) = MONTH ( MIN ( Dimdate[Date] ) )
    )
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Community Support Team _Tang&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 09:33:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-stock-Number-of-current-contracts-per-month-with-a/m-p/2766781#M85960</guid>
      <dc:creator>v-xiaotang</dc:creator>
      <dc:date>2022-09-14T09:33:26Z</dc:date>
    </item>
  </channel>
</rss>

