<?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: Finding previous date's value in one column based on another column in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Finding-previous-date-s-value-in-one-column-based-on-another/m-p/1018077#M13124</link>
    <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;try Measure&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = 
var _curDate = MAX('Table'[Date])
var _prevDate = CALCULATE(MAX('Table'[Date]), ALLEXCEPT('Table','Table'[Segment]),'Table'[Date] &amp;lt; _curDate)

RETURN

CALCULATE(SUM('Table'[UniqueOpenRate]), FILTER(ALLEXCEPT('Table','Table'[Segment]),'Table'[Date] = _prevDate))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 09 Apr 2020 17:24:30 GMT</pubDate>
    <dc:creator>az38</dc:creator>
    <dc:date>2020-04-09T17:24:30Z</dc:date>
    <item>
      <title>Finding previous date's value in one column based on another column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Finding-previous-date-s-value-in-one-column-based-on-another/m-p/1018036#M13123</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I really got stuck with this one. I can't find any help for the PREVIOUSDAY function. I need to add a column with the previous date's value for a certain value in another column. My dates are not continuous. Example:&lt;/P&gt;&lt;P&gt;Segment&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Date&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; UniqueOpenRate&lt;BR /&gt;WiFi&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1/3/2020 15%&lt;BR /&gt;Hotel concierge 1/3/2020 14%&lt;BR /&gt;WiFi&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2/3/2020 16%&lt;BR /&gt;Hotel Concierge 2/3/2020 13%&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to be able to add a new column where I set the previous value for each Segment:&lt;/P&gt;&lt;P&gt;Segment&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Date&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PrevOpenRate&lt;BR /&gt;WiFi&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2/3/2020 15%&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I do that?&lt;BR /&gt;Thanks!&lt;BR /&gt;Stan&lt;/P&gt;</description>
      <pubDate>Thu, 09 Apr 2020 16:57:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Finding-previous-date-s-value-in-one-column-based-on-another/m-p/1018036#M13123</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-04-09T16:57:33Z</dc:date>
    </item>
    <item>
      <title>Re: Finding previous date's value in one column based on another column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Finding-previous-date-s-value-in-one-column-based-on-another/m-p/1018077#M13124</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;try Measure&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = 
var _curDate = MAX('Table'[Date])
var _prevDate = CALCULATE(MAX('Table'[Date]), ALLEXCEPT('Table','Table'[Segment]),'Table'[Date] &amp;lt; _curDate)

RETURN

CALCULATE(SUM('Table'[UniqueOpenRate]), FILTER(ALLEXCEPT('Table','Table'[Segment]),'Table'[Date] = _prevDate))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Apr 2020 17:24:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Finding-previous-date-s-value-in-one-column-based-on-another/m-p/1018077#M13124</guid>
      <dc:creator>az38</dc:creator>
      <dc:date>2020-04-09T17:24:30Z</dc:date>
    </item>
    <item>
      <title>Re: Finding previous date's value in one column based on another column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Finding-previous-date-s-value-in-one-column-based-on-another/m-p/1018097#M13125</link>
      <description>&lt;P&gt;This works! Thank you so much! Yuu saved me so much time!&lt;/P&gt;</description>
      <pubDate>Thu, 09 Apr 2020 17:52:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Finding-previous-date-s-value-in-one-column-based-on-another/m-p/1018097#M13125</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-04-09T17:52:04Z</dc:date>
    </item>
  </channel>
</rss>

