<?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: DAX-How to Count Month Basis Value in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-How-to-Count-Month-Basis-Value/m-p/1140839#M17070</link>
    <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Created the calendar table and relate it with Completed date. Then use following measures:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Tickets Closed = 
    COUNTROWS(dtTable)

Ticket Closed (Before Due Date) = 
    CALCULATE(
        [Tickets Closed],
           FILTER(
                dtTable,
                dtTable[ClosedDate] &amp;lt; dtTable[DueDate]
           )
    )




Ticket Closed (Prev Month) = 
CALCULATE(
    [Tickets Closed],
    PREVIOUSMONTH(ftCalendar[Date])
)

Ticket Closed (Before Due Date, Prev Month) = 
CALCULATE(
    [Ticket Closed (Before Due Date)],
    PREVIOUSMONTH(ftCalendar[Date])
)


% Closed (CM) = DIVIDE([Ticket Closed (Before Due Date)],[Tickets Closed])

% Closed (PM) = DIVIDE([Ticket Closed (Before Due Date, Prev Month)],[Ticket Closed (Prev Month)])&lt;/LI-CODE&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;Sol &lt;A href="https://vivranin-my.sharepoint.com/:u:/g/personal/vivek_ranjan_vivran_in/EbMDHXECUTBPve8n47XXJKoBW0vDu0EFwJF6AKtAat5EDA?e=gBzjuP" target="_blank" rel="noopener"&gt;pbix file here&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers!&lt;BR /&gt;Vivek&lt;BR /&gt;&lt;BR /&gt;If it helps, please mark it as a solution. Kudos would be a cherry on the top &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;If it doesn't, then please share a sample data along with the expected results (preferably an excel file and not an image)&lt;BR /&gt;&lt;BR /&gt;Blog: &lt;A href="https://www.vivran.in/my-blog" target="_blank"&gt;vivran.in/my-blog&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://www.linkedin.com/in/vivek-ranjan-063a1a17b/" target="_blank"&gt;Connect on LinkedIn&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://twitter.com/imvivran" target="_blank"&gt;Follow on Twitter&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 04 Jun 2020 06:53:31 GMT</pubDate>
    <dc:creator>vivran22</dc:creator>
    <dc:date>2020-06-04T06:53:31Z</dc:date>
    <item>
      <title>DAX-How to Count Month Basis Value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-How-to-Count-Month-Basis-Value/m-p/1131252#M16804</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I would like to count the&amp;nbsp; count of ticket Closed Last Month and Current Month&amp;nbsp; &amp;nbsp;(Count of Tickets closed Closed Date &amp;lt;&amp;nbsp; Due Date) / Count of TicketID ),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Kindly find the Below Table&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;i have used&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;LastMonthClosed = CALCULATE(Table[ClosedDate] &amp;lt; Table[DueDate] / COUNT(Table[TicketID]),Filter(Table,IF(Table[Type]=="Account" &amp;amp;&amp;amp; MONTH(TODAY()-1),0))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="32333" data-lia-user-login="nandukrishnavs" class="lia-mention lia-mention-user"&gt;nandukrishnavs&lt;/a&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sun, 31 May 2020 02:32:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-How-to-Count-Month-Basis-Value/m-p/1131252#M16804</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-31T02:32:41Z</dc:date>
    </item>
    <item>
      <title>Re: DAX-How to Count Month Basis Value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-How-to-Count-Month-Basis-Value/m-p/1131278#M16806</link>
      <description>&lt;P&gt;Hello&amp;nbsp;Anonymous&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You may try this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sample Data table:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Add a calendar table:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ftCalendar = 
ADDCOLUMNS(
    CALENDARAUTO(),
    "Year",YEAR([Date]),
    "Month",EOMONTH([Date],-1)+1,
    "QTR","Q" &amp;amp; FORMAT([Date],"Q")
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You may refer to the article for more details: &lt;A href="https://www.vivran.in/post/power-bi-time-intelligence-calendar-table" target="_blank" rel="noopener"&gt;Calendar Table&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Create relationships between the data table and calendar table&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Add following measures:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Ticket Created (Current Month) = 
    COUNTROWS(dtTable)

Tickets Closed = 
CALCULATE(
    [Ticket Created (Current Month)],
    USERELATIONSHIP(ftCalendar[Date],dtTable[ClosedDate])
)


Ticket Closed (Prev Month) = 
CALCULATE(
    [Tickets Closed],
    PREVIOUSMONTH(ftCalendar[Month])
)


Exceeding Due Date = 
VAR _Filter = 
    CALCULATETABLE(
        FILTER(
        dtTable,
        dtTable[DueDate] &amp;lt; dtTable[ClosedDate]),
            USERELATIONSHIP(ftCalendar[Date],dtTable[DueDate])
        )
VAR _Count = 
        COUNTROWS(_Filter)

RETURN
_Count&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You will get the following result&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Solution &lt;A href="https://vivranin-my.sharepoint.com/:u:/g/personal/vivek_ranjan_vivran_in/EbMDHXECUTBPve8n47XXJKoBW0vDu0EFwJF6AKtAat5EDA?e=nhb8IF" target="_blank" rel="noopener"&gt;PBIX file here&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers!&lt;BR /&gt;Vivek&lt;BR /&gt;&lt;BR /&gt;If it helps, please mark it as a solution. Kudos would be a cherry on the top :)(Hit the thumbs up button!)&lt;BR /&gt;If it doesn't, then please share a sample data along with the expected results (preferably an excel file and not an image)&lt;BR /&gt;&lt;BR /&gt;Visit blog:&lt;A href="https://www.vivran.in/my-blog" target="_blank"&gt;&amp;nbsp;vivran.in/my-blog&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Feel free to &lt;A href="mailto:contact@vivran.in" target="_blank"&gt;email&lt;/A&gt; me for any BI needs .&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.linkedin.com/in/vivek-ranjan-063a1a17b/" target="_blank"&gt;Connect on LinkedIn&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://twitter.com/imvivran" target="_blank"&gt;Follow on Twitter&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 31 May 2020 03:34:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-How-to-Count-Month-Basis-Value/m-p/1131278#M16806</guid>
      <dc:creator>vivran22</dc:creator>
      <dc:date>2020-05-31T03:34:18Z</dc:date>
    </item>
    <item>
      <title>Re: DAX-How to Count Month Basis Value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-How-to-Count-Month-Basis-Value/m-p/1132223#M16834</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="141768" data-lia-user-login="vivran22" class="lia-mention lia-mention-user"&gt;vivran22&lt;/a&gt;&amp;nbsp; &amp;nbsp; I'm not able open your PBIX file, showing some error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jun 2020 04:59:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-How-to-Count-Month-Basis-Value/m-p/1132223#M16834</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-06-01T04:59:21Z</dc:date>
    </item>
    <item>
      <title>Re: DAX-How to Count Month Basis Value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-How-to-Count-Month-Basis-Value/m-p/1132266#M16836</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ideally, it should open as I can access the file using the same link.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Reposting the link&lt;/P&gt;&lt;P&gt;&lt;A href="https://vivranin-my.sharepoint.com/:u:/g/personal/vivek_ranjan_vivran_in/EbMDHXECUTBPve8n47XXJKoBW0vDu0EFwJF6AKtAat5EDA?e=xG4bAw" target="_blank" rel="noopener"&gt;Sol file&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers!&lt;BR /&gt;Vivek&lt;BR /&gt;&lt;BR /&gt;If it helps, please mark it as a solution. Kudos would be a cherry on the top &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;If it doesn't, then please share a sample data along with the expected results (preferably an excel file and not an image)&lt;BR /&gt;&lt;BR /&gt;Feel free to &lt;A href="mailto:contact@vivran.in" target="_blank"&gt;email&lt;/A&gt; me for any BI needs.&lt;BR /&gt;Blog: &lt;A href="https://www.vivran.in/my-blog" target="_blank"&gt;vivran.in/my-blog&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://www.linkedin.com/in/vivek-ranjan-063a1a17b/" target="_blank"&gt;Connect on LinkedIn&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://twitter.com/imvivran" target="_blank"&gt;Follow on Twitter&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jun 2020 05:47:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-How-to-Count-Month-Basis-Value/m-p/1132266#M16836</guid>
      <dc:creator>vivran22</dc:creator>
      <dc:date>2020-06-01T05:47:16Z</dc:date>
    </item>
    <item>
      <title>Re: DAX-How to Count Month Basis Value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-How-to-Count-Month-Basis-Value/m-p/1137807#M16995</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="141768" data-lia-user-login="vivran22" class="lia-mention lia-mention-user"&gt;vivran22&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;Hi,&lt;/P&gt;&lt;P&gt;Kindly&amp;nbsp;&lt;A title="Sample Data" href="https://drive.google.com/file/d/1jR7PaqQ6YA_tu_ML-cnar_PRn0X7AUTi/view?usp=sharing" target="_blank" rel="noopener"&gt;Download&lt;/A&gt;&amp;nbsp;the Sample data&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Condition:&amp;nbsp; &amp;nbsp;Last Month = if(type="Account") and (Closed Date &amp;lt; Request Due Date) / (Count of Tickets Closed last Month)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CurrentMonth =&amp;nbsp;&amp;nbsp; if(type="Account") and (Closed Date &amp;lt; Request Due Date) / (Count of Tickets Closed Current Month)&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2020 06:12:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-How-to-Count-Month-Basis-Value/m-p/1137807#M16995</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-06-03T06:12:00Z</dc:date>
    </item>
    <item>
      <title>Re: DAX-How to Count Month Basis Value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-How-to-Count-Month-Basis-Value/m-p/1138764#M17012</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Follow the calendar creation process and link it with the data table as suggested in the post earlier.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then use the following measures:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Ticket Closed (Current Month) = 
VAR _Filter = 
     FILTER(
                dtTable,
                dtTable[Type] = "Account"
                    &amp;amp;&amp;amp; dtTable[ClosedDate] &amp;lt; dtTable[DueDate]
            )
VAR _Count = 
    CALCULATE(
        COUNTROWS(dtTable),
           _Filter
    )

RETURN
_Count


Ticket Closed (Prev Month) = 
CALCULATE(
    [Ticket Closed (Current Month)],
    PREVIOUSMONTH(ftCalendar[Month])
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers!&lt;BR /&gt;Vivek&lt;BR /&gt;&lt;BR /&gt;If it helps, please mark it as a solution. Kudos would be a cherry on the top &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;If it doesn't, then please share a sample data along with the expected results (preferably an excel file and not an image)&lt;BR /&gt;&lt;BR /&gt;Blog: &lt;A href="https://www.vivran.in/my-blog" target="_blank"&gt;vivran.in/my-blog&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://www.linkedin.com/in/vivek-ranjan-063a1a17b/" target="_blank"&gt;Connect on LinkedIn&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://twitter.com/imvivran" target="_blank"&gt;Follow on Twitter&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2020 11:31:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-How-to-Count-Month-Basis-Value/m-p/1138764#M17012</guid>
      <dc:creator>vivran22</dc:creator>
      <dc:date>2020-06-03T11:31:19Z</dc:date>
    </item>
    <item>
      <title>Re: DAX-How to Count Month Basis Value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-How-to-Count-Month-Basis-Value/m-p/1138855#M17017</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="141768" data-lia-user-login="vivran22" class="lia-mention lia-mention-user"&gt;vivran22&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it's Not working&amp;nbsp; kindly find below condition&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Last Month = if(type="Account") and (Closed Date &amp;lt; Request Due Date) / (Count of Tickets Closed last Month)&lt;/P&gt;&lt;P&gt;CurrentMonth =&amp;nbsp;&amp;nbsp; if(type="Account") and (Closed Date &amp;lt; Request Due Date) / (Count of Tickets Closed Current Month)&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2020 12:28:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-How-to-Count-Month-Basis-Value/m-p/1138855#M17017</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-06-03T12:28:25Z</dc:date>
    </item>
    <item>
      <title>Re: DAX-How to Count Month Basis Value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-How-to-Count-Month-Basis-Value/m-p/1139121#M17030</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is not clear what do you mean by "/" in you condition.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you tell me the expected output (in a form of table) from the example dataset you have shared?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers!&lt;BR /&gt;Vivek&lt;BR /&gt;&lt;BR /&gt;Blog: &lt;A href="https://www.vivran.in/my-blog" target="_blank"&gt;vivran.in/my-blog&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://www.linkedin.com/in/vivek-ranjan-063a1a17b/" target="_blank"&gt;Connect on LinkedIn&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://twitter.com/imvivran" target="_blank"&gt;Follow on Twitter&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2020 14:37:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-How-to-Count-Month-Basis-Value/m-p/1139121#M17030</guid>
      <dc:creator>vivran22</dc:creator>
      <dc:date>2020-06-03T14:37:29Z</dc:date>
    </item>
    <item>
      <title>Re: DAX-How to Count Month Basis Value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-How-to-Count-Month-Basis-Value/m-p/1139536#M17045</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="141768" data-lia-user-login="vivran22" class="lia-mention lia-mention-user"&gt;vivran22&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kindly&amp;nbsp;&lt;A href="https://drive.google.com/file/d/1sfKGjYrw2IE3yHeecB_6oWb67N0TOlIS/view?usp=sharing" target="_blank" rel="noopener"&gt;Download&lt;/A&gt;&amp;nbsp; the Sample Result File (i have mentioned conditions and sample Results)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Condition:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Current Month = (if type=Account and (Closed date &amp;lt; Due date) divided by no of Ticket ID closed by Current Month)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Last Month = (if type=Account and (Closed date &amp;lt; Due date) divided by no of&amp;nbsp; Ticket ID closed by Last Month)&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2020 16:59:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-How-to-Count-Month-Basis-Value/m-p/1139536#M17045</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-06-03T16:59:16Z</dc:date>
    </item>
    <item>
      <title>Re: DAX-How to Count Month Basis Value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-How-to-Count-Month-Basis-Value/m-p/1140839#M17070</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Created the calendar table and relate it with Completed date. Then use following measures:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Tickets Closed = 
    COUNTROWS(dtTable)

Ticket Closed (Before Due Date) = 
    CALCULATE(
        [Tickets Closed],
           FILTER(
                dtTable,
                dtTable[ClosedDate] &amp;lt; dtTable[DueDate]
           )
    )




Ticket Closed (Prev Month) = 
CALCULATE(
    [Tickets Closed],
    PREVIOUSMONTH(ftCalendar[Date])
)

Ticket Closed (Before Due Date, Prev Month) = 
CALCULATE(
    [Ticket Closed (Before Due Date)],
    PREVIOUSMONTH(ftCalendar[Date])
)


% Closed (CM) = DIVIDE([Ticket Closed (Before Due Date)],[Tickets Closed])

% Closed (PM) = DIVIDE([Ticket Closed (Before Due Date, Prev Month)],[Ticket Closed (Prev Month)])&lt;/LI-CODE&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;Sol &lt;A href="https://vivranin-my.sharepoint.com/:u:/g/personal/vivek_ranjan_vivran_in/EbMDHXECUTBPve8n47XXJKoBW0vDu0EFwJF6AKtAat5EDA?e=gBzjuP" target="_blank" rel="noopener"&gt;pbix file here&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers!&lt;BR /&gt;Vivek&lt;BR /&gt;&lt;BR /&gt;If it helps, please mark it as a solution. Kudos would be a cherry on the top &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;If it doesn't, then please share a sample data along with the expected results (preferably an excel file and not an image)&lt;BR /&gt;&lt;BR /&gt;Blog: &lt;A href="https://www.vivran.in/my-blog" target="_blank"&gt;vivran.in/my-blog&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://www.linkedin.com/in/vivek-ranjan-063a1a17b/" target="_blank"&gt;Connect on LinkedIn&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://twitter.com/imvivran" target="_blank"&gt;Follow on Twitter&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jun 2020 06:53:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-How-to-Count-Month-Basis-Value/m-p/1140839#M17070</guid>
      <dc:creator>vivran22</dc:creator>
      <dc:date>2020-06-04T06:53:31Z</dc:date>
    </item>
  </channel>
</rss>

