<?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: Calculated Column with value of previous year in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column-with-value-of-previous-year/m-p/1659971#M33818</link>
    <description>&lt;P&gt;&lt;!-- StartFragment  --&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="cf0"&gt;=&lt;/SPAN&gt;&lt;SPAN class="cf1"&gt;DAte&lt;/SPAN&gt;&lt;SPAN class="cf0"&gt;(&lt;/SPAN&gt;&lt;SPAN class="cf1"&gt;YEAR&lt;/SPAN&gt;&lt;SPAN class="cf0"&gt;(Table1[date]-1),&lt;/SPAN&gt;&lt;SPAN class="cf1"&gt;MONTH&lt;/SPAN&gt;&lt;SPAN class="cf0"&gt;(Table1[date]),&lt;/SPAN&gt;&lt;SPAN class="cf1"&gt;DAY&lt;/SPAN&gt;&lt;SPAN class="cf0"&gt;(Table1[date]))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;!-- EndFragment  --&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 11 Feb 2021 09:21:45 GMT</pubDate>
    <dc:creator>rfigtree</dc:creator>
    <dc:date>2021-02-11T09:21:45Z</dc:date>
    <item>
      <title>Calculated Column with value of previous year</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column-with-value-of-previous-year/m-p/1659955#M33817</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the following table:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&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;&amp;nbsp;&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;&amp;nbsp;&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The table column is linked to another date table. I would like to insert a calculated column with the value of the same month (for the same &lt;STRONG&gt;Company_ID&lt;/STRONG&gt;), but the year before. Is this possible and if so, which DAX formula do I use?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot!!!&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2021 09:54:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column-with-value-of-previous-year/m-p/1659955#M33817</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-02-11T09:54:09Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Column with value of previous year</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column-with-value-of-previous-year/m-p/1659971#M33818</link>
      <description>&lt;P&gt;&lt;!-- StartFragment  --&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="cf0"&gt;=&lt;/SPAN&gt;&lt;SPAN class="cf1"&gt;DAte&lt;/SPAN&gt;&lt;SPAN class="cf0"&gt;(&lt;/SPAN&gt;&lt;SPAN class="cf1"&gt;YEAR&lt;/SPAN&gt;&lt;SPAN class="cf0"&gt;(Table1[date]-1),&lt;/SPAN&gt;&lt;SPAN class="cf1"&gt;MONTH&lt;/SPAN&gt;&lt;SPAN class="cf0"&gt;(Table1[date]),&lt;/SPAN&gt;&lt;SPAN class="cf1"&gt;DAY&lt;/SPAN&gt;&lt;SPAN class="cf0"&gt;(Table1[date]))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;!-- EndFragment  --&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2021 09:21:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column-with-value-of-previous-year/m-p/1659971#M33818</guid>
      <dc:creator>rfigtree</dc:creator>
      <dc:date>2021-02-11T09:21:45Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Column with value of previous year</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column-with-value-of-previous-year/m-p/1659994#M33823</link>
      <description>&lt;P&gt;Hi, this returns the date, I need the column to return the corresponding &lt;STRONG&gt;Value&lt;/STRONG&gt; of that date (Column 4).&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2021 09:30:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column-with-value-of-previous-year/m-p/1659994#M33823</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-02-11T09:30:03Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Column with value of previous year</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column-with-value-of-previous-year/m-p/1660004#M33824</link>
      <description>&lt;P&gt;maybe something like this but if multiple values on that date will give you largest value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;=calculate(max(othertable[value]),filter(all(othertable),othertable[date]=&lt;SPAN class="cf1"&gt;DAte&lt;/SPAN&gt;&lt;SPAN class="cf0"&gt;(&lt;/SPAN&gt;&lt;SPAN class="cf1"&gt;YEAR&lt;/SPAN&gt;&lt;SPAN class="cf0"&gt;(Table1[date]-1),&lt;/SPAN&gt;&lt;SPAN class="cf1"&gt;MONTH&lt;/SPAN&gt;&lt;SPAN class="cf0"&gt;(Table1[date]),&lt;/SPAN&gt;&lt;SPAN class="cf1"&gt;DAY&lt;/SPAN&gt;&lt;SPAN class="cf0"&gt;(Table1[date]))&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2021 09:36:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column-with-value-of-previous-year/m-p/1660004#M33824</guid>
      <dc:creator>rfigtree</dc:creator>
      <dc:date>2021-02-11T09:36:27Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Column with value of previous year</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column-with-value-of-previous-year/m-p/1660018#M33826</link>
      <description>&lt;P&gt;So with othertable you're referring to the Date-table, correct? Value is not a Column in that Date-table. This date-table is just one column of dates to be able to make use of the time-intelligence functions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also just tried your formula, and unfortunately it just returns the same value.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2021 09:44:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column-with-value-of-previous-year/m-p/1660018#M33826</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-02-11T09:44:59Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Column with value of previous year</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column-with-value-of-previous-year/m-p/1660737#M33851</link>
      <description>&lt;P&gt;I made a previous post where i asked for a dummy variable to show whether the revenue was bigger compared tot his year and this helped me. I am posting the code here:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Growth = 
var __ThisMth = Revenue[Date]
var __ThisCo = Revenue[Company]
var __ThisStmt = Revenue[Statement]
var __PrevMth = DATEADD(Revenue[Date], -1, YEAR)
var __ThisValue = Revenue[Value]
var __PrevValue = LOOKUPVALUE(Revenue[Value], 
                    Revenue[Company], __ThisCo, 
                    Revenue[Statement], __ThisStmt, 
                    Revenue[Date], __PrevMth)
RETURN
IF ( __ThisValue &amp;gt; __PrevValue, 1, 0)&lt;/LI-CODE&gt;&lt;P&gt;All credits go to&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="13353" data-lia-user-login="dedelman_clng" class="lia-mention lia-mention-user"&gt;dedelman_clng&lt;/a&gt;&amp;nbsp;, I hope this can also help some other people that need the value of the previous year next to the current one.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2021 14:19:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column-with-value-of-previous-year/m-p/1660737#M33851</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-02-11T14:19:45Z</dc:date>
    </item>
  </channel>
</rss>

