<?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: Return data from specified time interval in all rows in a calculated column in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-data-from-specified-time-interval-in-all-rows-in-a/m-p/1949374#M42490</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;This calculated column formula works&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;CALCULATE(SUM(Data[CY]),FILTER(Data,Data[Month]=EDATE(MAX(Data[Month]),-36)&amp;amp;&amp;amp;Data[Month]=EDATE(MAX(Data[Month]),-36)))&lt;/LI-CODE&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 10 Jul 2021 05:02:02 GMT</pubDate>
    <dc:creator>Ashish_Mathur</dc:creator>
    <dc:date>2021-07-10T05:02:02Z</dc:date>
    <item>
      <title>Return data from specified time interval in all rows in a calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-data-from-specified-time-interval-in-all-rows-in-a/m-p/1949320#M42484</link>
      <description>&lt;DIV class="lia-message-subject lia-component-message-view-widget-subject"&gt;&lt;DIV class="MessageSubject"&gt;&lt;DIV class="lia-message-subject"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="lia-message-body lia-component-message-view-widget-body lia-component-body-signature-highlight-escalation lia-component-message-view-widget-body-signature-highlight-escalation"&gt;&lt;DIV class="lia-message-body-content"&gt;&lt;P&gt;Hi !&lt;/P&gt;&lt;P&gt;My Data:-&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Year&lt;/TD&gt;&lt;TD&gt;Month&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;CY&lt;/TD&gt;&lt;TD&gt;2018&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2019&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Jan,19&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;784003.6&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2020&lt;/TD&gt;&lt;TD&gt;Jan,20&lt;/TD&gt;&lt;TD&gt;796923&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2021&lt;/TD&gt;&lt;TD&gt;Jan,21&lt;/TD&gt;&lt;TD&gt;912686.3&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2018&lt;/TD&gt;&lt;TD&gt;Jan,18&lt;/TD&gt;&lt;TD&gt;754578.3&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;I want to return year 2018 CY Value i.e. 754578 in 2018 Column in all rows.&lt;BR /&gt;The calculation should be based on latest month for e.g.&lt;BR /&gt;MAX(Month),dateadd(month,-3,year)&lt;BR /&gt;So, here I want to find from Jan, 2021, to 3 years prior data.&lt;BR /&gt;I tried with this options but not working.&lt;BR /&gt;&lt;img /&gt;&lt;img /&gt;&lt;img /&gt;&lt;img /&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance !&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 10 Jul 2021 02:38:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-data-from-specified-time-interval-in-all-rows-in-a/m-p/1949320#M42484</guid>
      <dc:creator>souvik900766</dc:creator>
      <dc:date>2021-07-10T02:38:29Z</dc:date>
    </item>
    <item>
      <title>Re: Return data from specified time interval in all rows in a calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-data-from-specified-time-interval-in-all-rows-in-a/m-p/1949332#M42485</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;What exactly is your end objective?&amp;nbsp; Also, why are you writing this as a calculated column formula (and not as a measure)?&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jul 2021 02:49:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-data-from-specified-time-interval-in-all-rows-in-a/m-p/1949332#M42485</guid>
      <dc:creator>Ashish_Mathur</dc:creator>
      <dc:date>2021-07-10T02:49:09Z</dc:date>
    </item>
    <item>
      <title>Re: Return data from specified time interval in all rows in a calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-data-from-specified-time-interval-in-all-rows-in-a/m-p/1949340#M42486</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="19851" data-lia-user-login="Ashish_Mathur" class="lia-mention lia-mention-user"&gt;Ashish_Mathur&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Mu objective&lt;BR /&gt;&lt;SPAN&gt;I want to return year 2018 CY Value i.e. 754578 in 2018 Column in &lt;STRONG&gt;all rows.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The calculation should be based on latest month for e.g.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MAX(Month),dateadd(month,-3,year)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So, here I want to find from Jan, 2021, to 3 years prior data.&lt;BR /&gt;&lt;/SPAN&gt;This is the requirement of the client....If u want u can solve this with measure....I will try to convert it into columns&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jul 2021 03:33:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-data-from-specified-time-interval-in-all-rows-in-a/m-p/1949340#M42486</guid>
      <dc:creator>souvik900766</dc:creator>
      <dc:date>2021-07-10T03:33:15Z</dc:date>
    </item>
    <item>
      <title>Re: Return data from specified time interval in all rows in a calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-data-from-specified-time-interval-in-all-rows-in-a/m-p/1949374#M42490</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;This calculated column formula works&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;CALCULATE(SUM(Data[CY]),FILTER(Data,Data[Month]=EDATE(MAX(Data[Month]),-36)&amp;amp;&amp;amp;Data[Month]=EDATE(MAX(Data[Month]),-36)))&lt;/LI-CODE&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jul 2021 05:02:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-data-from-specified-time-interval-in-all-rows-in-a/m-p/1949374#M42490</guid>
      <dc:creator>Ashish_Mathur</dc:creator>
      <dc:date>2021-07-10T05:02:02Z</dc:date>
    </item>
    <item>
      <title>Re: Return data from specified time interval in all rows in a calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-data-from-specified-time-interval-in-all-rows-in-a/m-p/1949386#M42491</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="19851" data-lia-user-login="Ashish_Mathur" class="lia-mention lia-mention-user"&gt;Ashish_Mathur&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Its returning some different value.&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jul 2021 05:30:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-data-from-specified-time-interval-in-all-rows-in-a/m-p/1949386#M42491</guid>
      <dc:creator>souvik900766</dc:creator>
      <dc:date>2021-07-10T05:30:21Z</dc:date>
    </item>
    <item>
      <title>Re: Return data from specified time interval in all rows in a calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-data-from-specified-time-interval-in-all-rows-in-a/m-p/1949567#M42498</link>
      <description>&lt;LI-CODE lang="csharp"&gt;// I think you're not doing it right
// since having columns named like
// 2019, 2PY, 2018... is a clear sign
// you're not modeling your data
// the way it should be and you're not
// following Best Practices of dimensional
// design. But it's up to you after all
// to solve problems that do not exist
// in correct models.
//
// With that being said, here is
// the thing you want, I guess:

[2018] = // calculated column
var CurrentMonth = T[Month]
var _2018Value =
    MAXX(
        // This filter should return
        // not more than 1 row. Possibly
        // an empty set depending on
        // your data.
        filter(
            T,
            T[Year] = 2018
            &amp;amp;&amp;amp;
            T[Month] = CurrentMonth
        ),
        T[CY]
    )
return
    _2018Value&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 10 Jul 2021 11:20:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-data-from-specified-time-interval-in-all-rows-in-a/m-p/1949567#M42498</guid>
      <dc:creator>daxer-almighty</dc:creator>
      <dc:date>2021-07-10T11:20:39Z</dc:date>
    </item>
    <item>
      <title>Re: Return data from specified time interval in all rows in a calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-data-from-specified-time-interval-in-all-rows-in-a/m-p/1949610#M42504</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="255913" data-lia-user-login="daxer-almighty" class="lia-mention lia-mention-user"&gt;daxer-almighty&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;Its not returning the correct value.&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jul 2021 12:58:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-data-from-specified-time-interval-in-all-rows-in-a/m-p/1949610#M42504</guid>
      <dc:creator>souvik900766</dc:creator>
      <dc:date>2021-07-10T12:58:43Z</dc:date>
    </item>
    <item>
      <title>Re: Return data from specified time interval in all rows in a calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-data-from-specified-time-interval-in-all-rows-in-a/m-p/1949613#M42505</link>
      <description>&lt;P&gt;Your formula is different than mine. That's the first thing. Secondly, you asked about the year 2018. This is what I gave you. The month you put in my formula must be &lt;STRONG&gt;the plain month without the year attached&lt;/STRONG&gt;,&amp;nbsp;of course. Please create a column that will store just the plain month as a number (1,...,12) or a name.&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jul 2021 13:05:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-data-from-specified-time-interval-in-all-rows-in-a/m-p/1949613#M42505</guid>
      <dc:creator>daxer-almighty</dc:creator>
      <dc:date>2021-07-10T13:05:52Z</dc:date>
    </item>
  </channel>
</rss>

