<?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: DAX measure help: Filter on division, split by subdivision and year in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-help-Filter-on-division-split-by-subdivision-and/m-p/3078062#M107103</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="207275" data-lia-user-login="DataInsights" class="lia-mention lia-mention-user"&gt;DataInsights&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much! It is almost working perfectly. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The only thing: If I show more than one division in my matrix, the measure calculates the Top20 suppliers across all shown/selected divisions, not the top20 for each division.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to modify the measure, so if I have several divisions showing, it will calculate the top20 for each division seperately?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Otherwise I will mark your answer as the solution and be happy with, what I got. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 13 Feb 2023 15:49:42 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-02-13T15:49:42Z</dc:date>
    <item>
      <title>DAX measure help: Filter on division, split by subdivision and year</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-help-Filter-on-division-split-by-subdivision-and/m-p/3049920#M105013</link>
      <description>&lt;P&gt;Greetings all. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm a rookie, when it comes to DAX and even though I'm taking both courses, reading the Definite Guide and practicing, I have a task, which unfortunately cannot wait for me to get proficient enough, to solve it on my own.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a data-model with one table in it (not my choice), with the following important columns:&lt;/P&gt;&lt;P&gt;Department, division, subdivision, unit, month &amp;amp; year of expense, supplier name, expense amount.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need a measure to supply me with the Division Top20 suppliers based on expense amount (filterable by the month &amp;amp; year).&amp;nbsp;&lt;/P&gt;&lt;P&gt;The trick is, that I then need to divide each divisions Top20 suppliers onto the subdivisions and units of that division.&lt;/P&gt;&lt;P&gt;So for each division, I need to show how much of that Top20 spend, each of their subdivisions and units have.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm currently using a matrix with supplier, subdivision and unit as rows, and expense amount (and other amounts) as values.&amp;nbsp;&lt;BR /&gt;Then I have a slicer on division and a slicer on the month &amp;amp; year ("mmm yy").&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've filtered the matrix with the Top20 suppliers based on expense amount, and it seems to be working with the current row-configuration. (With suppliers on top and subdivision &amp;amp; unit as lowerlevel rows)... However, I need to have subdivisions as top-row and then the filter works on the subdivision-level, not the division level. Hence my need for a division-level measure.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note: I am using live-data, so I cannot use calculated columns (the options are grayed out for me). Everything has to be in a measure, unfortunately.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to do this dynamically? I.e. without using a fixed division-name as the filter for each measure, but using a slicer to determine the division-name on which, the top20 is filtered?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sadly, I cannot load a datasample, as that would be a breach of protocol here... But if needed, I'll create something.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope, you can help. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards, Emiel&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 08:59:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-help-Filter-on-division-split-by-subdivision-and/m-p/3049920#M105013</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-30T08:59:28Z</dc:date>
    </item>
    <item>
      <title>Re: DAX measure help: Filter on division, split by subdivision and year</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-help-Filter-on-division-split-by-subdivision-and/m-p/3077878#M107079</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try these measures:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Expense Total = SUM ( Table1[Expense Amount] )&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Top 20 Suppliers = 
// get the top 20 Suppliers for the current Division
VAR vTopRows =
    CALCULATETABLE (
        TOPN ( 20, VALUES ( Table1[Supplier Name] ), [Expense Total] ),
        ALLSELECTED ( Table1 ),
        VALUES ( Table1[Division] )
    )
// calculate Expense Total in the context of the top 20 Suppliers
VAR vResult =
    CALCULATE ( [Expense Total], vTopRows )
RETURN
    vResult&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 13 Feb 2023 14:15:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-help-Filter-on-division-split-by-subdivision-and/m-p/3077878#M107079</guid>
      <dc:creator>DataInsights</dc:creator>
      <dc:date>2023-02-13T14:15:06Z</dc:date>
    </item>
    <item>
      <title>Re: DAX measure help: Filter on division, split by subdivision and year</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-help-Filter-on-division-split-by-subdivision-and/m-p/3078062#M107103</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="207275" data-lia-user-login="DataInsights" class="lia-mention lia-mention-user"&gt;DataInsights&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much! It is almost working perfectly. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The only thing: If I show more than one division in my matrix, the measure calculates the Top20 suppliers across all shown/selected divisions, not the top20 for each division.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to modify the measure, so if I have several divisions showing, it will calculate the top20 for each division seperately?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Otherwise I will mark your answer as the solution and be happy with, what I got. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2023 15:49:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-help-Filter-on-division-split-by-subdivision-and/m-p/3078062#M107103</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-02-13T15:49:42Z</dc:date>
    </item>
    <item>
      <title>Re: DAX measure help: Filter on division, split by subdivision and year</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-help-Filter-on-division-split-by-subdivision-and/m-p/3078179#M107119</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Would you be able to create a mock-up of the scenario? It sounds like the Division slicer would have multiple values selected. You could try using SUMMARIZE instead of VALUES:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Top 20 Suppliers = 
// get the top 20 Suppliers for the current Division
VAR vTopRows =
    CALCULATETABLE (
        TOPN ( 20, SUMMARIZE ( Table1, Table1[Division], Table1[Supplier Name] ), [Expense Total] ),
        ALLSELECTED ( Table1 ),
        VALUES ( Table1[Division] )
    )
// calculate Expense Total in the context of the top 20 Suppliers
VAR vResult =
    CALCULATE ( [Expense Total], vTopRows )
RETURN
    vResult&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2023 17:17:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-help-Filter-on-division-split-by-subdivision-and/m-p/3078179#M107119</guid>
      <dc:creator>DataInsights</dc:creator>
      <dc:date>2023-02-13T17:17:16Z</dc:date>
    </item>
    <item>
      <title>Re: DAX measure help: Filter on division, split by subdivision and year</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-help-Filter-on-division-split-by-subdivision-and/m-p/3079068#M107194</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="207275" data-lia-user-login="DataInsights" class="lia-mention lia-mention-user"&gt;DataInsights&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I'll make a mock-up ASAP, thank you. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Sadly, summarize didn't change the situation, but I'm still closer, than I've ever been. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;And yes, I haven't forced the user to single-select a division in the slicer, as some of our business partners have more than one division in their portfolio.&lt;BR /&gt;&lt;BR /&gt;I'll tag you, when I have the mock-up...&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;And thank you again for helping. I appreciate it a lot.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2023 08:17:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-help-Filter-on-division-split-by-subdivision-and/m-p/3079068#M107194</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-02-14T08:17:17Z</dc:date>
    </item>
  </channel>
</rss>

