<?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 Count number of times store is in TOPN - Calculate a top 3 of a top 3 in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-number-of-times-store-is-in-TOPN-Calculate-a-top-3-of-a/m-p/2324871#M58163</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to find the top 3 stores of the weekly top 3 stores in the selected period (data selection in the slicers).&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;First I need the top 3 stores per thursday week.&lt;BR /&gt;&lt;EM&gt;Calculate, stores that have the most stores claims (distinctcount document id)&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;Next I want to know from all the weekly top 3 stores, which 3 stores appear the most often in the weekly top 3 stores.&lt;BR /&gt;&lt;EM&gt;Count number of times the store name appear in the weekly top 3.&lt;/EM&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;The first top 3 I manage to do with a TOPN measure. But the second Top 3 I don't figure out how to get it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attached I included a pbix file with example data.&lt;/P&gt;&lt;P&gt;Hope someone can help out!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 08 Feb 2022 08:05:40 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-02-08T08:05:40Z</dc:date>
    <item>
      <title>Count number of times store is in TOPN - Calculate a top 3 of a top 3</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-number-of-times-store-is-in-TOPN-Calculate-a-top-3-of-a/m-p/2324871#M58163</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to find the top 3 stores of the weekly top 3 stores in the selected period (data selection in the slicers).&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;First I need the top 3 stores per thursday week.&lt;BR /&gt;&lt;EM&gt;Calculate, stores that have the most stores claims (distinctcount document id)&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;Next I want to know from all the weekly top 3 stores, which 3 stores appear the most often in the weekly top 3 stores.&lt;BR /&gt;&lt;EM&gt;Count number of times the store name appear in the weekly top 3.&lt;/EM&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;The first top 3 I manage to do with a TOPN measure. But the second Top 3 I don't figure out how to get it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attached I included a pbix file with example data.&lt;/P&gt;&lt;P&gt;Hope someone can help out!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Feb 2022 08:05:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-number-of-times-store-is-in-TOPN-Calculate-a-top-3-of-a/m-p/2324871#M58163</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-02-08T08:05:40Z</dc:date>
    </item>
    <item>
      <title>Re: Count number of times store is in TOPN - Calculate a top 3 of a top 3</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-number-of-times-store-is-in-TOPN-Calculate-a-top-3-of-a/m-p/2324967#M58170</link>
      <description>&lt;P&gt;I don't know how to add a pbix file... &lt;span class="lia-unicode-emoji" title=":thinking_face:"&gt;🤔&lt;/span&gt;&lt;BR /&gt;Here a copy from the test data in advanced editor&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("nZ1brl23DYanUvi5SHSX+Jq+Bmjfgz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fctnc2ZovqXKWk+bsy/Nbm+rY649XgUu7p41d4Yt2U0xx/EvuDZXBHK0HlSutIS4IPfZ78RNxGX+L9fIfigOgoWfTig4BY6UVxLSulSoCV65bm7AgdJvmaWneRrExTWs7hb05/8B", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"DOC ID" = _t, DATE = _t, AMOUNT = _t, #"STORE ID" = _t, #"STORE NAME" = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"DATE", type date}, {"DOC ID", Int64.Type}, {"STORE ID", Int64.Type}, {"AMOUNT", Currency.Type}})
in
    #"Changed Type"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Feb 2022 08:41:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-number-of-times-store-is-in-TOPN-Calculate-a-top-3-of-a/m-p/2324967#M58170</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-02-08T08:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: Count number of times store is in TOPN - Calculate a top 3 of a top 3</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-number-of-times-store-is-in-TOPN-Calculate-a-top-3-of-a/m-p/2327471#M58326</link>
      <description>&lt;P&gt;Hey,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;To your existing query (named it Data) I would add Date table, with weeks column.&lt;BR /&gt;Then a measure of Amount should be created = SUM('Data'[Amount])&lt;BR /&gt;Then a rank to be added e.g.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Then another (3rd) measure created with the purpose of&amp;nbsp;&lt;BR /&gt;1- summarizing per store, week, amount, rank 2 - filtering only those that are in top 3 and 3 - calculating rows of top 3.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;at the end I placed this measure in table and can see that there are two Stores that have same score&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;This is something quickly put together. If you want to show best performing store(s) you could also add a measure to concatinate those that have max score in Top 3 measure&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Hope this helps&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Feb 2022 07:48:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-number-of-times-store-is-in-TOPN-Calculate-a-top-3-of-a/m-p/2327471#M58326</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-02-09T07:48:49Z</dc:date>
    </item>
  </channel>
</rss>

