<?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 Measure to calculate previous month values with a strict data context in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Measure-to-calculate-previous-month-values-with-a-strict-data/m-p/4003802#M53539</link>
    <description>&lt;P&gt;Hello fellow bi collegues,&lt;/P&gt;&lt;P&gt;I'm struggling to define a dax measure that would return the number of issues (I work with azure devops data) for the previous month only; kinda fixed context in the measure, what I did so far is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;!totClosedLastMonth = CALCULATE([!workItemCount],fact_devops[WorkItemType]="Issue",fact_devops[State]="Closed",DATEADD(dim_date[Date],-1,MONTH),USERELATIONSHIP(dim_date[Date],fact_devops[DATEKEYCLOSED]))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and it works but it requires to enforce context somewhere in filters, I'd like that measure to return a fixed value for the previous month comparing to the current one. How to do that?&lt;/P&gt;</description>
    <pubDate>Fri, 21 Jun 2024 09:46:50 GMT</pubDate>
    <dc:creator>binoobie</dc:creator>
    <dc:date>2024-06-21T09:46:50Z</dc:date>
    <item>
      <title>Measure to calculate previous month values with a strict data context</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Measure-to-calculate-previous-month-values-with-a-strict-data/m-p/4003802#M53539</link>
      <description>&lt;P&gt;Hello fellow bi collegues,&lt;/P&gt;&lt;P&gt;I'm struggling to define a dax measure that would return the number of issues (I work with azure devops data) for the previous month only; kinda fixed context in the measure, what I did so far is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;!totClosedLastMonth = CALCULATE([!workItemCount],fact_devops[WorkItemType]="Issue",fact_devops[State]="Closed",DATEADD(dim_date[Date],-1,MONTH),USERELATIONSHIP(dim_date[Date],fact_devops[DATEKEYCLOSED]))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and it works but it requires to enforce context somewhere in filters, I'd like that measure to return a fixed value for the previous month comparing to the current one. How to do that?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2024 09:46:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Measure-to-calculate-previous-month-values-with-a-strict-data/m-p/4003802#M53539</guid>
      <dc:creator>binoobie</dc:creator>
      <dc:date>2024-06-21T09:46:50Z</dc:date>
    </item>
    <item>
      <title>Re: Measure to calculate previous month values with a strict data context</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Measure-to-calculate-previous-month-values-with-a-strict-data/m-p/4004637#M53550</link>
      <description>&lt;LI-CODE lang="markup"&gt; I'd like that measure to return a fixed value for the previous month comparing to the current one.&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The interpretation of "current month"&amp;nbsp; and "previous month"&amp;nbsp; depends on the filter context. If you hard code that then you have to change your report design every month, Surely you don't want that?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2024 19:05:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Measure-to-calculate-previous-month-values-with-a-strict-data/m-p/4004637#M53550</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-06-21T19:05:11Z</dc:date>
    </item>
    <item>
      <title>Re: Measure to calculate previous month values with a strict data context</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Measure-to-calculate-previous-month-values-with-a-strict-data/m-p/4006593#M53662</link>
      <description>&lt;P&gt;Yes, I want a filter context (report level) to be fixed and restricted for current and previous month (given report display time by a report user) only - without letting user to get back deeper in the past. Not neccesairly want this to change every month and I already did that using variables and defining current and previous months using EOMONTH and TODAY functions.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2024 09:18:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Measure-to-calculate-previous-month-values-with-a-strict-data/m-p/4006593#M53662</guid>
      <dc:creator>binoobie</dc:creator>
      <dc:date>2024-06-24T09:18:29Z</dc:date>
    </item>
    <item>
      <title>Re: Measure to calculate previous month values with a strict data context</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Measure-to-calculate-previous-month-values-with-a-strict-data/m-p/4008852#M53693</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/100342"&gt;@lbendlin&lt;/a&gt;&amp;nbsp;Thanks for your contribution on this thread.&lt;/P&gt;
&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/763856"&gt;@binoobie&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I still don't understand what your needs are? Could you please clarify your requirements? Are you attempting to calculate the difference between the current month’s value and the previous month’s value? If possible, providing &lt;STRONG&gt;sample data&lt;/STRONG&gt;&amp;nbsp;with &lt;FONT color="#FF0000"&gt;Text&lt;/FONT&gt; format and &lt;STRONG&gt;practical example&lt;/STRONG&gt;s would greatly assist in understanding your logic and desired outcome.&lt;SPAN&gt;&amp;nbsp;It would be helpful to find out the solution. You can refer the following link to share the required info:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcommunity.powerbi.com%2Ft5%2FCommunity-Blog%2FHow-to-provide-sample-data-in-the-Power-BI-Forum%2Fba-p%2F963216&amp;amp;data=05%7C02%7Cv-yiruan%40microsoft.com%7C72a729b3e0f548641beb08dc91bfe72d%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638545500633600603%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&amp;amp;sdata=SNvOMqstZJKNcBJmDgOsnV6ScSyq%2BvLVO2T2LMd2qWo%3D&amp;amp;reserved=0" target="_blank" rel="noopener"&gt;How to provide sample data in the Power BI Forum&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2024 09:43:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Measure-to-calculate-previous-month-values-with-a-strict-data/m-p/4008852#M53693</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-06-25T09:43:13Z</dc:date>
    </item>
  </channel>
</rss>

