<?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 Top row result in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-Top-row-result/m-p/2207767#M52012</link>
    <description>&lt;P&gt;&lt;SPAN&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="295629" data-lia-user-login="v-yalanwu-msft" class="lia-mention lia-mention-user"&gt;v-yalanwu-msft&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;Thank you very much, it worked perfectly.&lt;BR /&gt;&lt;BR /&gt;Ps. Talesfg&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 25 Nov 2021 12:48:56 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-11-25T12:48:56Z</dc:date>
    <item>
      <title>Return Top row result</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-Top-row-result/m-p/2197180#M51497</link>
      <description>&lt;P&gt;I have a table in fact that I have a calculation of a KPI, in the DAX view I need to return the result of the previous axis as shown in the image below from a dimension table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example, 2021 Q3 the KPI2 line returns the result of 2021 Q2&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;I used a form of rank to find the previous value with reference to rank -1, but I couldn't find any solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2021 17:35:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-Top-row-result/m-p/2197180#M51497</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-11-18T17:35:31Z</dc:date>
    </item>
    <item>
      <title>Re: Return Top row result</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-Top-row-result/m-p/2197201#M51501</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt; , you need to create a dense rank on period label&amp;nbsp; or order KPI and prefer that to be in separate column along with base column, joined to this table &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;example&lt;/P&gt;
&lt;P&gt;new column&lt;/P&gt;
&lt;P&gt;Qtr Rank = RANKX(all('Date'),'Date'[Qtr Start date],,ASC,Dense)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Measure&amp;nbsp; &lt;BR /&gt;This Qtr = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Qtr Rank]=max('Date'[Qtr Rank])))&lt;BR /&gt;Last Qtr = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Qtr Rank]=max('Date'[Qtr Rank])-1))&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 approach which we follow on week or custom months&lt;/P&gt;
&lt;P&gt;Power BI — Week on Week and WTD &lt;BR /&gt;&lt;A href="https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3" target="_blank"&gt;https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-Last-Week/ba-p/1051123" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-Last-Week/ba-p/1051123&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://www.youtube.com/watch?v=pnAesWxYgJ8" target="_blank"&gt;https://www.youtube.com/watch?v=pnAesWxYgJ8&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2021 17:45:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-Top-row-result/m-p/2197201#M51501</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2021-11-18T17:45:53Z</dc:date>
    </item>
    <item>
      <title>Re: Return Top row result</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-Top-row-result/m-p/2200586#M51660</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;;&lt;/P&gt;
&lt;P&gt;You can use the Label_ period column directly, without the aid of rank. Please try it.&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;KPI 2 =
CALCULATE (
    SUM ( [KPI] ),
    FILTER (
        ALL ( 'Table' ),
        [label_ period]
            = MAXX (
                FILTER ( ALL ( 'Table' ), [label_ period] &amp;lt; MAX ( 'Table'[label_ period] ) ),
                [label_ period]
            )
    )
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;The final output is shown below:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Community Support Team_ Yalan Wu&lt;BR /&gt;If this post&lt;STRONG&gt;&lt;EM&gt; helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Nov 2021 06:02:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-Top-row-result/m-p/2200586#M51660</guid>
      <dc:creator>v-yalanwu-msft</dc:creator>
      <dc:date>2021-11-22T06:02:44Z</dc:date>
    </item>
    <item>
      <title>Re: Return Top row result</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-Top-row-result/m-p/2207767#M52012</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="295629" data-lia-user-login="v-yalanwu-msft" class="lia-mention lia-mention-user"&gt;v-yalanwu-msft&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;Thank you very much, it worked perfectly.&lt;BR /&gt;&lt;BR /&gt;Ps. Talesfg&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Nov 2021 12:48:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-Top-row-result/m-p/2207767#M52012</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-11-25T12:48:56Z</dc:date>
    </item>
    <item>
      <title>Re: Return Top row result</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-Top-row-result/m-p/2207769#M52013</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much, this solution also worked.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Nov 2021 12:52:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-Top-row-result/m-p/2207769#M52013</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-11-25T12:52:32Z</dc:date>
    </item>
  </channel>
</rss>

