<?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: TOPN by Date in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TOPN-by-Date/m-p/4259544#M168788</link>
    <description>&lt;P&gt;I finally got the first part to work!&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;TopDates = 
        CONCATENATEX(TOPN ( 
            7,
            VALUES( 'Calendar'[Calendar Date]), 
         [Gross Adds],
            DESC 
        ), [Calendar Date],CONCATENATE ( "", UNICHAR ( 10 ) ))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now for future dates I got it to work with:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;TopFutureDates = 
        CONCATENATEX(TOPN ( 
            7,
            VALUES( 'Calendar'[Calendar Date]), 
         [Gross Adds],
            DESC 
        ), [Calendar Date]+364,CONCATENATE ( "", UNICHAR ( 10 ) ))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;But is there a way to display the Dates&lt;STRONG&gt; and&lt;/STRONG&gt;&amp;nbsp;the Gross Adds in the [TopDates] measure above?&amp;nbsp; Right now I've only been able to display either or in the [TopDates] measure.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 27 Oct 2024 18:45:27 GMT</pubDate>
    <dc:creator>BrianNeedsHelp</dc:creator>
    <dc:date>2024-10-27T18:45:27Z</dc:date>
    <item>
      <title>TOPN by Date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TOPN-by-Date/m-p/4259336#M168774</link>
      <description>&lt;P&gt;I'm trying to caluclate the top 7 Gross Adds by month. So I use the filter topn in the filter section which works fine.&amp;nbsp; &amp;nbsp;But I want to have another table next to it that adds 364 days to each top 7 dates, so as to project the future year top dates but on the same weekday.&amp;nbsp; I have a slicer that is Month Year.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I try a measure that results in error that "expression refers to multiple columns".&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;TopFutureDates = 
        TOPN ( 
            7, 
            ALLSELECTED( 'Subscriber Activity'), 
         [Gross Adds],
            DESC 
        ) &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;So I tried:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;TopFutureDates = CALCULATE ( 
    SUMX(VALUES('Calendar'[Calendar Date]),[Gross Adds]),  
    KEEPFILTERS ( 
        TOPN ( 
            7, 
            ALLSELECTED( 'Subscriber Activity'), 
         [Gross Adds],
            DESC 
        ) 
    ) 
)&lt;/LI-CODE&gt;&lt;P&gt;This results in a sum total of the whole month not top 7.&amp;nbsp; If I include the date in the Columns pane it shows all of the dates for the whole month.&amp;nbsp; I'm wanting it to return the top 7 values along with the date.&amp;nbsp; Then add 364 days to each date it finds.&amp;nbsp; Thanks!&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 27 Oct 2024 05:13:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TOPN-by-Date/m-p/4259336#M168774</guid>
      <dc:creator>BrianNeedsHelp</dc:creator>
      <dc:date>2024-10-27T05:13:48Z</dc:date>
    </item>
    <item>
      <title>Re: TOPN by Date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TOPN-by-Date/m-p/4259447#M168782</link>
      <description>&lt;P&gt;Assuming your data model is wired with Calendar as dimension and Subscriber Activity as fact&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;TopFutureDates = 
        TOPN ( 
            7, 
            ALLSELECTED( 'Calendar'[Calendar Date]), 
         [Gross Adds],
            DESC 
        ) &lt;/LI-CODE&gt;
&lt;P&gt;Or encase it with SELECTCOLUMNS&lt;/P&gt;</description>
      <pubDate>Sun, 27 Oct 2024 12:03:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TOPN-by-Date/m-p/4259447#M168782</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-10-27T12:03:19Z</dc:date>
    </item>
    <item>
      <title>Re: TOPN by Date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TOPN-by-Date/m-p/4259516#M168785</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;&amp;nbsp;I get error: Table of multiple values was supplied where a single value was expected when using:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;TopFutureDates = 
        TOPN ( 
            7, 
            ALLSELECTED( 'Calendar'[Calendar Date]), 
         [Gross Adds],
            DESC 
        ) &lt;/LI-CODE&gt;&lt;P&gt;Tried this:&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;TopFutureDates = 
       SELECTCOLUMNS( TOPN ( 
            7, 
            ALLSELECTED( 'Calendar'[Calendar Date]), 
         [Gross Adds],
            DESC 
        ) )&lt;/LI-CODE&gt;&lt;P&gt;"Too few arguments were passed to the SelectColumns function.&amp;nbsp; The minimum argument count for the function is 2."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 27 Oct 2024 17:19:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TOPN-by-Date/m-p/4259516#M168785</guid>
      <dc:creator>BrianNeedsHelp</dc:creator>
      <dc:date>2024-10-27T17:19:08Z</dc:date>
    </item>
    <item>
      <title>Re: TOPN by Date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TOPN-by-Date/m-p/4259531#M168786</link>
      <description>&lt;P&gt;Once you&amp;nbsp; have your top 7 rows, what do you want to do with them next?&lt;/P&gt;</description>
      <pubDate>Sun, 27 Oct 2024 17:59:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TOPN-by-Date/m-p/4259531#M168786</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-10-27T17:59:02Z</dc:date>
    </item>
    <item>
      <title>Re: TOPN by Date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TOPN-by-Date/m-p/4259544#M168788</link>
      <description>&lt;P&gt;I finally got the first part to work!&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;TopDates = 
        CONCATENATEX(TOPN ( 
            7,
            VALUES( 'Calendar'[Calendar Date]), 
         [Gross Adds],
            DESC 
        ), [Calendar Date],CONCATENATE ( "", UNICHAR ( 10 ) ))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now for future dates I got it to work with:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;TopFutureDates = 
        CONCATENATEX(TOPN ( 
            7,
            VALUES( 'Calendar'[Calendar Date]), 
         [Gross Adds],
            DESC 
        ), [Calendar Date]+364,CONCATENATE ( "", UNICHAR ( 10 ) ))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;But is there a way to display the Dates&lt;STRONG&gt; and&lt;/STRONG&gt;&amp;nbsp;the Gross Adds in the [TopDates] measure above?&amp;nbsp; Right now I've only been able to display either or in the [TopDates] measure.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 27 Oct 2024 18:45:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TOPN-by-Date/m-p/4259544#M168788</guid>
      <dc:creator>BrianNeedsHelp</dc:creator>
      <dc:date>2024-10-27T18:45:27Z</dc:date>
    </item>
    <item>
      <title>Re: TOPN by Date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TOPN-by-Date/m-p/4259554#M168791</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Measures must return a single scalar value&lt;/STRONG&gt;. You can keep using CONCATENATEX but then you need to unpack that text result again yourself.&amp;nbsp; In this case Line Feed is not a useful string separator.&lt;/P&gt;</description>
      <pubDate>Sun, 27 Oct 2024 19:22:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/TOPN-by-Date/m-p/4259554#M168791</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-10-27T19:22:56Z</dc:date>
    </item>
  </channel>
</rss>

