<?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: Top N Customers based on the Sales of latest Fiscal Qtr in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Top-N-Customers-based-on-the-Sales-of-latest-Fiscal-Qtr/m-p/4693712#M179745</link>
    <description>&lt;LI-CODE lang="markup"&gt;Latest Fiscal Quarter = 
CALCULATE(
    MAX(Combined[Fiscal Quarter]),
    FILTER(
        ALL(Combined),
        Combined[Category] = "Sales"
    )
)&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 15 May 2025 08:47:20 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2025-05-15T08:47:20Z</dc:date>
    <item>
      <title>Top N Customers based on the Sales of latest Fiscal Qtr</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Top-N-Customers-based-on-the-Sales-of-latest-Fiscal-Qtr/m-p/4686370#M179495</link>
      <description>&lt;P&gt;Trying to create a Top N Slicer with customers being ranked by their latest quarter sales number with output of their Accounts Receivables.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table of Customers and their sales number. Based on FY25 Q4 (010/2025 and 011/2025), Ignite is ranked 1.&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;Slicing for top 1, I would only want Ignite to show up in the Open AR table using measure below. But currently, my measure is re-evaluating for each fiscal month instead of being fixed ranking based on latest Fiscal qtr. How to proceed?&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Open AR TopN = 
VAR TopNValue = SELECTEDVALUE('TopN Selection'[TopN Selection])
VAR LatestQtr = [Latest Fiscal Quarter]

// Customer rank for row level
VAR CustomerRank = 
    RANKX(
        ALLSELECTED(Combined[Customers]),
        [Latest Quarter Sales],
        ,
        DESC
    )

// Build Top N customer list for total level
VAR TopNCustomers = 
    TOPN(
        TopNValue, 
        SUMMARIZE(
            ALL(Combined[Customers]),
            Combined[Customers],
            "Sales", [Latest Quarter Sales]
        ), 
        [Latest Quarter Sales],
        DESC
    )

// Total Open AR for Top N Customers
VAR TotalOpenAR = 
    CALCULATE(
        SUM(Combined[Amount]),
        Combined[Category] = "Open AR",
        FILTER(
            ALL(Combined[Customers]),
            Combined[Customers] IN SELECTCOLUMNS(TopNCustomers, "Customer", Combined[Customers])
        )
    )

RETURN
IF(
    HASONEVALUE(Combined[Customers]),
    -- Row level: check rank
    IF(
        CustomerRank &amp;lt;= TopNValue,
        CALCULATE(
            SUM(Combined[Amount]),
            Combined[Category] = "Open AR"
        )
    ),
    -- Total level
    TotalOpenAR
)&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 May 2025 09:47:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Top-N-Customers-based-on-the-Sales-of-latest-Fiscal-Qtr/m-p/4686370#M179495</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-05-09T09:47:49Z</dc:date>
    </item>
    <item>
      <title>Re: Top N Customers based on the Sales of latest Fiscal Qtr</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Top-N-Customers-based-on-the-Sales-of-latest-Fiscal-Qtr/m-p/4686430#M179497</link>
      <description>&lt;P&gt;What is the definition of [Latest Quarter Sales] ?&lt;/P&gt;</description>
      <pubDate>Fri, 09 May 2025 10:14:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Top-N-Customers-based-on-the-Sales-of-latest-Fiscal-Qtr/m-p/4686430#M179497</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2025-05-09T10:14:36Z</dc:date>
    </item>
    <item>
      <title>Re: Top N Customers based on the Sales of latest Fiscal Qtr</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Top-N-Customers-based-on-the-Sales-of-latest-Fiscal-Qtr/m-p/4689252#M179584</link>
      <description>&lt;P&gt;Hi Anonymous&lt;/LI-USER&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To resolve the issue, you need to fix the ranking context so that it is based solely on total sales from the latest fiscal quarter, rather than recalculating for each individual month &amp;nbsp;for that it may be required re write the DAX logic from the beginning. This ensures that the Top N logic is evaluated just once using the most recent quarter’s sales figures and then applied consistently across all rows in your visual, regardless of other filters or breakdowns like fiscal month.&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;SPAN data-teams="true"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-teams="true"&gt;Please Accept as solution if this meets your needs and a Kudos would be appreciated.&lt;BR /&gt;&lt;BR /&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 May 2025 12:21:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Top-N-Customers-based-on-the-Sales-of-latest-Fiscal-Qtr/m-p/4689252#M179584</guid>
      <dc:creator>v-sgandrathi</dc:creator>
      <dc:date>2025-05-12T12:21:14Z</dc:date>
    </item>
    <item>
      <title>Re: Top N Customers based on the Sales of latest Fiscal Qtr</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Top-N-Customers-based-on-the-Sales-of-latest-Fiscal-Qtr/m-p/4691566#M179648</link>
      <description>&lt;LI-CODE lang="markup"&gt;Latest Quarter Sales = 
CALCULATE(
    SUM(Combined[Amount]),
    Combined[Category] = "Sales",
    TREATAS({[Latest Fiscal Quarter]}, Combined[Fiscal Quarter])
)&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 14 May 2025 01:55:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Top-N-Customers-based-on-the-Sales-of-latest-Fiscal-Qtr/m-p/4691566#M179648</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-05-14T01:55:40Z</dc:date>
    </item>
    <item>
      <title>Re: Top N Customers based on the Sales of latest Fiscal Qtr</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Top-N-Customers-based-on-the-Sales-of-latest-Fiscal-Qtr/m-p/4691567#M179649</link>
      <description>&lt;P&gt;I am struggling with how I should be re writing the logic such that the TOP N logic is evaluated only once using the most recent quarter's sales figure. Any help?&lt;/P&gt;</description>
      <pubDate>Wed, 14 May 2025 01:56:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Top-N-Customers-based-on-the-Sales-of-latest-Fiscal-Qtr/m-p/4691567#M179649</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-05-14T01:56:55Z</dc:date>
    </item>
    <item>
      <title>Re: Top N Customers based on the Sales of latest Fiscal Qtr</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Top-N-Customers-based-on-the-Sales-of-latest-Fiscal-Qtr/m-p/4691642#M179654</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;BR /&gt;As per my understanding, I tried to regenerate the issue and try to fix the issue.&lt;BR /&gt;Please find the atatched pbix file for your reference.&lt;BR /&gt;&lt;A href="https://cloudbiexpert-my.sharepoint.com/:u:/p/maruthi/EbqdsktcL_BHs0BSfscqANwBoElUxgf7g0sW5F-Hq2Pegg?e=f6o7eo" target="_blank"&gt;Top N Customers based on the Sales of latest Fiscal Qtr.pbix&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Please let me know if you have further questions.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;If this reply helped solve your problem, please consider clicking "&lt;STRONG&gt;Accept as Solution&lt;/STRONG&gt;" so others can benefit too.&amp;nbsp;And if you found it useful, a quick "&lt;STRONG&gt;Kudos&lt;/STRONG&gt;" is always appreciated, thanks!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maruthi&amp;nbsp;&lt;/P&gt;&lt;P&gt;LinkedIn -&amp;nbsp;&lt;A href="http://www.linkedin.com/in/maruthi-siva-prasad/" rel="nofollow noopener noreferrer" target="_blank"&gt;http://www.linkedin.com/in/maruthi-siva-prasad/&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;X&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;nbsp;&amp;nbsp;&lt;A href="https://x.com/maruthisp" rel="nofollow noopener noreferrer" target="_blank"&gt;Maruthi Siva Prasad - (@MaruthiSP) / X&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 May 2025 04:20:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Top-N-Customers-based-on-the-Sales-of-latest-Fiscal-Qtr/m-p/4691642#M179654</guid>
      <dc:creator>maruthisp</dc:creator>
      <dc:date>2025-05-14T04:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: Top N Customers based on the Sales of latest Fiscal Qtr</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Top-N-Customers-based-on-the-Sales-of-latest-Fiscal-Qtr/m-p/4692053#M179669</link>
      <description>&lt;P&gt;OK, that seems fine. What is the definition of [Latest Fiscal Quarter], and any measures that that depends on ?&lt;/P&gt;</description>
      <pubDate>Wed, 14 May 2025 08:36:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Top-N-Customers-based-on-the-Sales-of-latest-Fiscal-Qtr/m-p/4692053#M179669</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2025-05-14T08:36:37Z</dc:date>
    </item>
    <item>
      <title>Re: Top N Customers based on the Sales of latest Fiscal Qtr</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Top-N-Customers-based-on-the-Sales-of-latest-Fiscal-Qtr/m-p/4693553#M179737</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have you got a chance to review the&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="526044" data-lia-user-login="maruthisp" class="lia-mention lia-mention-user"&gt;maruthisp&lt;/a&gt;&amp;nbsp;answer&lt;/P&gt;
&lt;P&gt;I'm glad to hear that your query was resolved! If the response provided by the community member addressed your concern, kindly confirm.&lt;/P&gt;
&lt;P&gt;Marking it as &lt;STRONG&gt;Accept Answer&lt;/STRONG&gt;&amp;nbsp;and give us &lt;STRONG&gt;Kudos&lt;/STRONG&gt;&amp;nbsp;if you found it helpful allows us to ensure that the solutions shared are valuable for the entire community.&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 May 2025 07:20:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Top-N-Customers-based-on-the-Sales-of-latest-Fiscal-Qtr/m-p/4693553#M179737</guid>
      <dc:creator>v-sgandrathi</dc:creator>
      <dc:date>2025-05-15T07:20:55Z</dc:date>
    </item>
    <item>
      <title>Re: Top N Customers based on the Sales of latest Fiscal Qtr</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Top-N-Customers-based-on-the-Sales-of-latest-Fiscal-Qtr/m-p/4693712#M179745</link>
      <description>&lt;LI-CODE lang="markup"&gt;Latest Fiscal Quarter = 
CALCULATE(
    MAX(Combined[Fiscal Quarter]),
    FILTER(
        ALL(Combined),
        Combined[Category] = "Sales"
    )
)&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 15 May 2025 08:47:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Top-N-Customers-based-on-the-Sales-of-latest-Fiscal-Qtr/m-p/4693712#M179745</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-05-15T08:47:20Z</dc:date>
    </item>
    <item>
      <title>Re: Top N Customers based on the Sales of latest Fiscal Qtr</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Top-N-Customers-based-on-the-Sales-of-latest-Fiscal-Qtr/m-p/4693902#M179756</link>
      <description>&lt;P&gt;The only issue that I see is that everything is in the same table, so it is possible that autoexists is causing a problem. You can read more about it at&amp;nbsp;&lt;A href="https://www.sqlbi.com/articles/understanding-dax-auto-exist/" target="_blank"&gt;Understanding DAX Auto-Exist - SQLBI&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I would create a proper date table, marked as a date table, and use columns from that in your visuals and measures.&lt;/P&gt;</description>
      <pubDate>Thu, 15 May 2025 10:02:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Top-N-Customers-based-on-the-Sales-of-latest-Fiscal-Qtr/m-p/4693902#M179756</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2025-05-15T10:02:53Z</dc:date>
    </item>
    <item>
      <title>Re: Top N Customers based on the Sales of latest Fiscal Qtr</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Top-N-Customers-based-on-the-Sales-of-latest-Fiscal-Qtr/m-p/4697176#M179905</link>
      <description>&lt;P&gt;Hi Anonymous&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As we did not get a response, may I know if the above reply could clarify your issue, or could you please help confirm if we may help you with anything else?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And if the provided information meets your requirements, you can Accept the solution and also give Kudos on that reply. It helps other users who are searching for this same information and find the information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your understanding and patience will be appreciated.&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 18 May 2025 11:20:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Top-N-Customers-based-on-the-Sales-of-latest-Fiscal-Qtr/m-p/4697176#M179905</guid>
      <dc:creator>v-sgandrathi</dc:creator>
      <dc:date>2025-05-18T11:20:37Z</dc:date>
    </item>
    <item>
      <title>Re: Top N Customers based on the Sales of latest Fiscal Qtr</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Top-N-Customers-based-on-the-Sales-of-latest-Fiscal-Qtr/m-p/4701628#M180086</link>
      <description>&lt;P&gt;HI Anonymous&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wanted to follow up on our previous suggestions regarding the issue. We would love to hear back from you to ensure we can assist you further.&lt;/P&gt;
&lt;P&gt;If our response has addressed your query, please accept it as a solution and give a ‘Kudos’ so other members can easily find it. Please let us know if there’s anything else we can do to help.&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for using Microsoft Fabric Community Forum.&lt;/P&gt;</description>
      <pubDate>Wed, 21 May 2025 11:58:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Top-N-Customers-based-on-the-Sales-of-latest-Fiscal-Qtr/m-p/4701628#M180086</guid>
      <dc:creator>v-sgandrathi</dc:creator>
      <dc:date>2025-05-21T11:58:36Z</dc:date>
    </item>
  </channel>
</rss>

