<?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: Need help with Previous Month Calculation in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-Previous-Month-Calculation/m-p/4059427#M161124</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;the formual for new logic measure is&amp;nbsp;&lt;/P&gt;&lt;P&gt;var _abc =&amp;nbsp; calculate([original exposure], allselected(table[originalexposure]), parallelperiod(date, -1 month)&lt;/P&gt;&lt;P&gt;return if([original exposure] = blank(), blank(), [original exposure] - _abc)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And I have used this formula also but it does subtotals if I add other dimensions and do a multi select&lt;/P&gt;&lt;P&gt;var _abc =&amp;nbsp; calculate([original exposure], allselected(table), parallelperiod(date, -1 month)&lt;/P&gt;&lt;P&gt;return if([original exposure] = blank(), blank(), [original exposure] - _abc)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately I cannot share screenshot because of sensitive data&lt;/P&gt;</description>
    <pubDate>Wed, 24 Jul 2024 15:34:07 GMT</pubDate>
    <dc:creator>Prateek_121</dc:creator>
    <dc:date>2024-07-24T15:34:07Z</dc:date>
    <item>
      <title>Need help with Previous Month Calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-Previous-Month-Calculation/m-p/4059420#M161121</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am creating a DAX measure to display the sum of previous month value. I have 1 more column in my fact table which I need to use in the same report and that column stores the value of flag yes or no which changes per month ( or maybe after two months). If I add that column in my report, my dax date time function ( any DateADD, parallelperiod ) adds that flag in the context and now if for example I have flag as Y in Dec 23 and in Jan 24 flag is N in the data then I get two rows for Jan 24 in the report one with flag Y and other with flag N and previous month value is displayed with flag Y where as row with flag value N shows blank. This is because now based on grouping which now has become reporting month and the flag after adding that column to the report. We need the column in our report and if I use allseelected() in my formula I am not do filters on other dim with multiselect since I get subtotals then. Is there a way with which I can avoid the column being used in the context for calculating previous month. Please note that are 10 such flag columns for now so adding each column in the formula or adding each dimension in the formula is not a valid solution. Also if there is a way I can use two different formulas that is also fine.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2024 15:32:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-Previous-Month-Calculation/m-p/4059420#M161121</guid>
      <dc:creator>Prateek_121</dc:creator>
      <dc:date>2024-07-24T15:32:41Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Previous Month Calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-Previous-Month-Calculation/m-p/4059427#M161124</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;the formual for new logic measure is&amp;nbsp;&lt;/P&gt;&lt;P&gt;var _abc =&amp;nbsp; calculate([original exposure], allselected(table[originalexposure]), parallelperiod(date, -1 month)&lt;/P&gt;&lt;P&gt;return if([original exposure] = blank(), blank(), [original exposure] - _abc)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And I have used this formula also but it does subtotals if I add other dimensions and do a multi select&lt;/P&gt;&lt;P&gt;var _abc =&amp;nbsp; calculate([original exposure], allselected(table), parallelperiod(date, -1 month)&lt;/P&gt;&lt;P&gt;return if([original exposure] = blank(), blank(), [original exposure] - _abc)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately I cannot share screenshot because of sensitive data&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2024 15:34:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-Previous-Month-Calculation/m-p/4059427#M161124</guid>
      <dc:creator>Prateek_121</dc:creator>
      <dc:date>2024-07-24T15:34:07Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Previous Month Calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-Previous-Month-Calculation/m-p/4060309#M161162</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="780184" data-lia-user-login="Prateek_121" class="lia-mention lia-mention-user"&gt;Prateek_121&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you simulate some dummy data to tell your question? Ideally, it will also provide the output you expect.&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 _Charlotte&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2024 03:56:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-Previous-Month-Calculation/m-p/4060309#M161162</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-07-25T03:56:43Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Previous Month Calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-Previous-Month-Calculation/m-p/4061021#M161195</link>
      <description>&lt;P&gt;&lt;A title="Dummy file" href="https://drive.google.com/file/d/1cCHUarTpIhDZDpUm0DZ_K2qY3zusu_GQ/view?usp=sharing" target="_self"&gt;https://drive.google.com/file/d/1cCHUarTpIhDZDpUm0DZ_K2qY3zusu_GQ/view?usp=sharing&lt;/A&gt;&amp;nbsp;-- link for the dummy dataset. Chart 1 and 2 are expected outputs but you can see both scenarios are not working with any measure .&amp;nbsp; Chart 5 shows what is happening with date time intelligence function when I have&amp;nbsp; added the flag column in the chart.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2024 09:14:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-Previous-Month-Calculation/m-p/4061021#M161195</guid>
      <dc:creator>Prateek_121</dc:creator>
      <dc:date>2024-07-25T09:14:02Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Previous Month Calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-Previous-Month-Calculation/m-p/4061022#M161196</link>
      <description>&lt;P&gt;added dataset in my reply post&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2024 09:14:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-Previous-Month-Calculation/m-p/4061022#M161196</guid>
      <dc:creator>Prateek_121</dc:creator>
      <dc:date>2024-07-25T09:14:28Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with Previous Month Calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-Previous-Month-Calculation/m-p/4061027#M161197</link>
      <description>&lt;P&gt;I have 10-12 dimensions like this with high number of distinct rows so using keepfilters() on each dimension is not a feasible solution for me&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2024 09:17:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-Previous-Month-Calculation/m-p/4061027#M161197</guid>
      <dc:creator>Prateek_121</dc:creator>
      <dc:date>2024-07-25T09:17:12Z</dc:date>
    </item>
  </channel>
</rss>

