<?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: Previous Month Revenue Using Fiscal Year and Fiscal Month in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Month-Revenue-Using-Fiscal-Year-and-Fiscal-Month/m-p/3996373#M155294</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="738384" data-lia-user-login="xifeng_L" class="lia-mention lia-mention-user"&gt;xifeng_L&lt;/a&gt;&amp;nbsp;Apologies for the corrupt file. I believe it is now fixed:&amp;nbsp;&lt;A href="https://drive.google.com/file/d/10ZjihaOvB_0Kv5ojUEcoTc1nyHlgCEZ6/view?usp=sharing" target="_self"&gt;Revenue PBI&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;I have a fiscal month index column in my datetable. How would I go about using this in my DAX calc?&amp;nbsp;&lt;BR /&gt;I tried the following,which has gotten me the closest, but it doesn't appear to give the previous month, as it's giving the same value.&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;Previous Month Rev = 
var _rev = CALCULATE(SUM('Revenue Breakdown'[Revenue Earned]), 'Revenue Breakdown'[Vendor Type] = "TMO")
RETURN
CALCULATE(
    _rev,
    DATEADD(vw_AMS_DateTable[CALDAY], -1, MONTH),
    ALLEXCEPT(vw_AMS_DateTable, vw_AMS_DateTable[FisIndexMonth]))&lt;/LI-CODE&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;</description>
    <pubDate>Mon, 17 Jun 2024 15:27:53 GMT</pubDate>
    <dc:creator>KMcCarthy9</dc:creator>
    <dc:date>2024-06-17T15:27:53Z</dc:date>
    <item>
      <title>Previous Month Revenue Using Fiscal Year and Fiscal Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Month-Revenue-Using-Fiscal-Year-and-Fiscal-Month/m-p/3993950#M155056</link>
      <description>&lt;P&gt;I need to calculate month over month of Revenue Earned but using Fiscal Year and Month. I'm at a complete loss how to do this since the normal date/time intelligence does not work.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I have a datetable that holds the fiscal information and a table that holds the revenue data. I *simply* just want to show the previous month value and then conditional formatting for an up or down arrow.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have attached my .pbix here:&amp;nbsp;&lt;A href="https://drive.google.com/file/d/10ZjihaOvB_0Kv5ojUEcoTc1nyHlgCEZ6/view?usp=sharing" target="_self"&gt;Revenue&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thank you in advance!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2024 14:39:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Month-Revenue-Using-Fiscal-Year-and-Fiscal-Month/m-p/3993950#M155056</guid>
      <dc:creator>KMcCarthy9</dc:creator>
      <dc:date>2024-06-17T14:39:18Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Month Revenue Using Fiscal Year and Fiscal Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Month-Revenue-Using-Fiscal-Year-and-Fiscal-Month/m-p/3994228#M155080</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="156212" data-lia-user-login="KMcCarthy9" class="lia-mention lia-mention-user"&gt;KMcCarthy9&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The file you provided is corrupted, and cannot be opened.&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;But I think using the DATESADD function should solve your problem?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or you can give the month an index number, such as ( &lt;STRONG&gt;month index = year*12 + month&lt;/STRONG&gt; ), and then use the &lt;STRONG&gt;current month index -1&lt;/STRONG&gt; to get the previous month.&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;P&gt;Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you~&lt;/P&gt;</description>
      <pubDate>Sat, 15 Jun 2024 09:18:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Month-Revenue-Using-Fiscal-Year-and-Fiscal-Month/m-p/3994228#M155080</guid>
      <dc:creator>xifeng_L</dc:creator>
      <dc:date>2024-06-15T09:18:57Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Month Revenue Using Fiscal Year and Fiscal Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Month-Revenue-Using-Fiscal-Year-and-Fiscal-Month/m-p/3996373#M155294</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="738384" data-lia-user-login="xifeng_L" class="lia-mention lia-mention-user"&gt;xifeng_L&lt;/a&gt;&amp;nbsp;Apologies for the corrupt file. I believe it is now fixed:&amp;nbsp;&lt;A href="https://drive.google.com/file/d/10ZjihaOvB_0Kv5ojUEcoTc1nyHlgCEZ6/view?usp=sharing" target="_self"&gt;Revenue PBI&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;I have a fiscal month index column in my datetable. How would I go about using this in my DAX calc?&amp;nbsp;&lt;BR /&gt;I tried the following,which has gotten me the closest, but it doesn't appear to give the previous month, as it's giving the same value.&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;Previous Month Rev = 
var _rev = CALCULATE(SUM('Revenue Breakdown'[Revenue Earned]), 'Revenue Breakdown'[Vendor Type] = "TMO")
RETURN
CALCULATE(
    _rev,
    DATEADD(vw_AMS_DateTable[CALDAY], -1, MONTH),
    ALLEXCEPT(vw_AMS_DateTable, vw_AMS_DateTable[FisIndexMonth]))&lt;/LI-CODE&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;</description>
      <pubDate>Mon, 17 Jun 2024 15:27:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Month-Revenue-Using-Fiscal-Year-and-Fiscal-Month/m-p/3996373#M155294</guid>
      <dc:creator>KMcCarthy9</dc:creator>
      <dc:date>2024-06-17T15:27:53Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Month Revenue Using Fiscal Year and Fiscal Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Month-Revenue-Using-Fiscal-Year-and-Fiscal-Month/m-p/3998489#M155622</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="156212" data-lia-user-login="KMcCarthy9" class="lia-mention lia-mention-user"&gt;KMcCarthy9&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can try below measure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Previous Month Rev = 
SUMX(
    SUMMARIZE('Datetable','Datetable'[FISCYEAR],'Datetable'[FISCMonthNumber],'Datetable'[FisIndexMonth]),
    VAR CurFISCMonthIndex = 'Datetable'[FisIndexMonth]
    RETURN
    CALCULATE(
        SUM('Revenue'[Revenue Earned]),
        'Datetable'[FisIndexMonth]=CurFISCMonthIndex-1,
        ALL('Datetable')
    )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;!-- StartFragment  --&gt;&lt;A href="https://1drv.ms/u/s!Avkq2QNvDlkrwVgUs0Asf-7KDJDK?e=Pdghje" target="_blank"&gt;Demo - Previous Month Rev.pbix&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;Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you~&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2024 14:51:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Month-Revenue-Using-Fiscal-Year-and-Fiscal-Month/m-p/3998489#M155622</guid>
      <dc:creator>xifeng_L</dc:creator>
      <dc:date>2024-06-18T14:51:59Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Month Revenue Using Fiscal Year and Fiscal Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Month-Revenue-Using-Fiscal-Year-and-Fiscal-Month/m-p/3998505#M155633</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="738384" data-lia-user-login="xifeng_L" class="lia-mention lia-mention-user"&gt;xifeng_L&lt;/a&gt;&amp;nbsp; This works! Thank you so much!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2024 15:01:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Month-Revenue-Using-Fiscal-Year-and-Fiscal-Month/m-p/3998505#M155633</guid>
      <dc:creator>KMcCarthy9</dc:creator>
      <dc:date>2024-06-18T15:01:57Z</dc:date>
    </item>
  </channel>
</rss>

