<?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: Calculate percentage of turnover of top N products on total turnover in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-percentage-of-turnover-of-top-N-products-on-total/m-p/2196427#M51463</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="315278" data-lia-user-login="VahidDM" class="lia-mention lia-mention-user"&gt;VahidDM&lt;/a&gt;&amp;nbsp;thank you for your help so far. Due the fact I'm using an OLAP-Datebase I'm not able to have a deeper view into the tables.&lt;/P&gt;&lt;P&gt;But I've tried to copy the both relevant Tabels/Measures:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did the selection of category by the filter function directly in power bi.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope it helps! Sorry for my&amp;nbsp;incomplete posting &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; I'm pretty new...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;Steffen&lt;/P&gt;</description>
    <pubDate>Thu, 18 Nov 2021 11:09:28 GMT</pubDate>
    <dc:creator>Dukeable</dc:creator>
    <dc:date>2021-11-18T11:09:28Z</dc:date>
    <item>
      <title>Calculate percentage of turnover of top N products on total turnover</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-percentage-of-turnover-of-top-N-products-on-total/m-p/2192800#M51293</link>
      <description>&lt;P&gt;Hi there!&lt;/P&gt;&lt;P&gt;I'm sure the issue is probably simple but I'm struggling with the DAX.&lt;BR /&gt;I have a dashboard that gives me my top 10 items on a certain category (audio as an example). These make a turnover of 8.000.000€. The total turnover of audio is 19.000.000€. Now I want to divide my turnover of my top 10 products from the category by the total turnover of the audio category in order to be able to put them in relation to each other. I am sure that I have to work with DIVIDE, TOPN, SUMX and or CALCULATE - but unfortunately I can't solve it yet. Can anyone help me?&lt;/P&gt;&lt;P&gt;Best regards!&lt;/P&gt;&lt;P&gt;Steffen&lt;/P&gt;</description>
      <pubDate>Tue, 16 Nov 2021 15:40:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-percentage-of-turnover-of-top-N-products-on-total/m-p/2192800#M51293</guid>
      <dc:creator>Dukeable</dc:creator>
      <dc:date>2021-11-16T15:40:17Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate percentage of turnover of top N products on total turnover</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-percentage-of-turnover-of-top-N-products-on-total/m-p/2193307#M51318</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="339092" data-lia-user-login="Dukeable" class="lia-mention lia-mention-user"&gt;Dukeable&lt;/a&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can you post sample data as text and expected output?&lt;BR /&gt;Not enough information to go on;&lt;BR /&gt;&lt;BR /&gt;please see this post regarding How to Get Your Question Answered Quickly:&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;SPAN&gt;The most important parts are:&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;BR /&gt;1. Sample data as text, use the table tool in the editing bar&lt;BR /&gt;2. Expected output from sample data&lt;BR /&gt;3. Explanation in words of how to get from 1. to 2.&lt;BR /&gt;4. Relation between your tables&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;SPAN&gt;Appreciate your Kudos!!&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;SPAN&gt;LinkedIn:&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&lt;A href="https://www.linkedin.com/in/vahid-dm/" target="_blank"&gt;www.linkedin.com/in/vahid-dm/&lt;/A&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Nov 2021 22:09:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-percentage-of-turnover-of-top-N-products-on-total/m-p/2193307#M51318</guid>
      <dc:creator>VahidDM</dc:creator>
      <dc:date>2021-11-16T22:09:09Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate percentage of turnover of top N products on total turnover</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-percentage-of-turnover-of-top-N-products-on-total/m-p/2194194#M51365</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="315278" data-lia-user-login="VahidDM" class="lia-mention lia-mention-user"&gt;VahidDM&lt;/a&gt;&amp;nbsp;for sure. Thank you for your information - I will keep that in mind for further postings.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One Visual/Table with the Top 4 Styles for category audio as follow:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;Tops Styles for Category Audio&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;turnover&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1. Style&lt;/TD&gt;&lt;TD&gt;5.000.000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2. Style&lt;/TD&gt;&lt;TD&gt;1.000.000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3. Style&lt;/TD&gt;&lt;TD&gt;750.000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4. Style&lt;/TD&gt;&lt;TD&gt;250.000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5. Style&lt;/TD&gt;&lt;TD&gt;100.000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Total&lt;/TD&gt;&lt;TD&gt;7.100.000&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;So the filter is category: audio and Top 5 Styles listed DESC in addtion to the turnover.&lt;/P&gt;&lt;P&gt;In a second visual/table i have the whole turnover for category audio:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;Category&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Turnover&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Audio&lt;/TD&gt;&lt;TD&gt;19.000.000&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;The filter for that table is only category: audio.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also have an table with all stlyes where i can get the top 5 from&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Style&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Catgory&lt;/TD&gt;&lt;TD&gt;turnover&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;Audio&lt;/TD&gt;&lt;TD&gt;30.000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;Gaming&lt;/TD&gt;&lt;TD&gt;1.500&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;etc.&lt;/TD&gt;&lt;TD&gt;etc.&lt;/TD&gt;&lt;TD&gt;etc.&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So what I want as an output to see is what is the percentage of the top style on the whole turnover for category audio. So the result should be: The turnover of the top 5 stlyes in the catgory audio has an percentage of 37,37% on the whole turnover of category audio. So I can show if the impact of the top styles is high/low regarding the whole turnover.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope I made it more clearer now &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;Steffen&lt;/P&gt;</description>
      <pubDate>Wed, 17 Nov 2021 10:49:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-percentage-of-turnover-of-top-N-products-on-total/m-p/2194194#M51365</guid>
      <dc:creator>Dukeable</dc:creator>
      <dc:date>2021-11-17T10:49:46Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate percentage of turnover of top N products on total turnover</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-percentage-of-turnover-of-top-N-products-on-total/m-p/2195352#M51403</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="339092" data-lia-user-login="Dukeable" class="lia-mention lia-mention-user"&gt;Dukeable&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It'd be greate if you share a sample of your data table, but if I got your point correctly try this measure:&lt;/P&gt;&lt;LI-CODE lang="php"&gt;Measure = 
Var _A = filter(ADDCOLUMNS('Table',"Rank",RANKX(filter(all('Table'),[Category ]="Audio"),[Turnover],,DESC,Dense)),[Rank]&amp;lt;=5)
Var _B = CALCULATE(SUM('Table'[Turnover]),filter(all('Table'),'Table'[Category ]=max('Table'[Category ])))
return
SUMX(_A,[Turnover])/_B&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Output:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;SPAN&gt;helps&lt;/SPAN&gt;&lt;/STRONG&gt;, please consider&amp;nbsp;&lt;SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;accepting&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;it as the solution&lt;/SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;to help the other members find it more quickly.&lt;BR /&gt;&lt;STRONG&gt;&lt;SPAN&gt;Appreciate your Kudos!!&lt;BR /&gt;&lt;STRONG&gt;LinkedIn:&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&lt;A href="https://www.linkedin.com/in/vahid-dm/" target="_blank"&gt;www.linkedin.com/in/vahid-dm/&lt;/A&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Nov 2021 22:02:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-percentage-of-turnover-of-top-N-products-on-total/m-p/2195352#M51403</guid>
      <dc:creator>VahidDM</dc:creator>
      <dc:date>2021-11-17T22:02:04Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate percentage of turnover of top N products on total turnover</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-percentage-of-turnover-of-top-N-products-on-total/m-p/2196427#M51463</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="315278" data-lia-user-login="VahidDM" class="lia-mention lia-mention-user"&gt;VahidDM&lt;/a&gt;&amp;nbsp;thank you for your help so far. Due the fact I'm using an OLAP-Datebase I'm not able to have a deeper view into the tables.&lt;/P&gt;&lt;P&gt;But I've tried to copy the both relevant Tabels/Measures:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did the selection of category by the filter function directly in power bi.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope it helps! Sorry for my&amp;nbsp;incomplete posting &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; I'm pretty new...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;Steffen&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2021 11:09:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-percentage-of-turnover-of-top-N-products-on-total/m-p/2196427#M51463</guid>
      <dc:creator>Dukeable</dc:creator>
      <dc:date>2021-11-18T11:09:28Z</dc:date>
    </item>
  </channel>
</rss>

