<?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: Help with baseline top 5% in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-baseline-top-5/m-p/4028700#M159186</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="771209" data-lia-user-login="Mikes128" class="lia-mention lia-mention-user"&gt;Mikes128&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you please try the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Calculate the difference between the current year and the baseline&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;DifferenceMeasure = 
    [CurrentYearValue] - [BaselineValue]
&lt;/LI-CODE&gt;
&lt;P&gt;2. Filter out negative values&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;FilteredDifferenceMeasure = 
    IF([DifferenceMeasure] &amp;gt; 0, [DifferenceMeasure], BLANK())
&lt;/LI-CODE&gt;
&lt;P&gt;3. Rank the top 5 values of the filtered difference&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;RankFilteredDifference =
    RANKX(
        ALL('Table'), 
        [FilteredDifferenceMeasure], 
        , 
        DESC, 
        DENSE
    )
&lt;/LI-CODE&gt;
&lt;P&gt;4. Show the top 5 values of the filtered difference&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Top5FilteredDifference = 
    IF(
        [RankFilteredDifference] &amp;lt;= 5,
        [FilteredDifferenceMeasure],
        BLANK()
    )
&lt;/LI-CODE&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
    <pubDate>Sun, 07 Jul 2024 13:23:08 GMT</pubDate>
    <dc:creator>Sahir_Maharaj</dc:creator>
    <dc:date>2024-07-07T13:23:08Z</dc:date>
    <item>
      <title>Help with baseline top 5%</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-baseline-top-5/m-p/4027218#M159064</link>
      <description>&lt;P&gt;I have the following measures: &amp;nbsp;top 5 values for the difference between current year and baseline and difference between current year. &amp;nbsp;The issue I am having is that the top 5 can be +100% due to negative values in the difference. &amp;nbsp;Is there a way that I can filter the negative values out of the difference measure?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2024 14:38:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-baseline-top-5/m-p/4027218#M159064</guid>
      <dc:creator>Mikes128</dc:creator>
      <dc:date>2024-07-05T14:38:08Z</dc:date>
    </item>
    <item>
      <title>Re: Help with baseline top 5%</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-baseline-top-5/m-p/4028700#M159186</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="771209" data-lia-user-login="Mikes128" class="lia-mention lia-mention-user"&gt;Mikes128&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you please try the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Calculate the difference between the current year and the baseline&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;DifferenceMeasure = 
    [CurrentYearValue] - [BaselineValue]
&lt;/LI-CODE&gt;
&lt;P&gt;2. Filter out negative values&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;FilteredDifferenceMeasure = 
    IF([DifferenceMeasure] &amp;gt; 0, [DifferenceMeasure], BLANK())
&lt;/LI-CODE&gt;
&lt;P&gt;3. Rank the top 5 values of the filtered difference&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;RankFilteredDifference =
    RANKX(
        ALL('Table'), 
        [FilteredDifferenceMeasure], 
        , 
        DESC, 
        DENSE
    )
&lt;/LI-CODE&gt;
&lt;P&gt;4. Show the top 5 values of the filtered difference&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Top5FilteredDifference = 
    IF(
        [RankFilteredDifference] &amp;lt;= 5,
        [FilteredDifferenceMeasure],
        BLANK()
    )
&lt;/LI-CODE&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Sun, 07 Jul 2024 13:23:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-baseline-top-5/m-p/4028700#M159186</guid>
      <dc:creator>Sahir_Maharaj</dc:creator>
      <dc:date>2024-07-07T13:23:08Z</dc:date>
    </item>
  </channel>
</rss>

