<?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: Matrix Calculation on 1st and 2nd Level in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Matrix-Calculation-on-1st-and-2nd-Level/m-p/3464334#M132186</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="621585" data-lia-user-login="BOkungbure" class="lia-mention lia-mention-user"&gt;BOkungbure&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please try this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1.&amp;nbsp;Calculate the Maximum Total across all Sections&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Max Total Value = 
MAXX(
    ALL('YourTableName'[Main Section]),
    SUMX(
        FILTER(
            'YourTableName',
            'YourTableName'[Main Section] = EARLIER('YourTableName'[Main Section])
        ),
        'YourTableName'[Value]
    )
)&lt;/LI-CODE&gt;&lt;P&gt;2.&amp;nbsp;Calculate the Ratio&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Ratio = 
VAR MainSectionTotal = 
SUMX(
    FILTER(
        'YourTableName',
        'YourTableName'[Main Section] = EARLIER('YourTableName'[Main Section])
    ),
    'YourTableName'[Value]
)

VAR CurrentValue = 
IF(
    ISINSCOPE('YourTableName'[Sub Section]),
    SUM('YourTableName'[Value]),
    MainSectionTotal
)

RETURN
DIVIDE(CurrentValue, [Max Total Value])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Should you require any further assistance, feel free to reach out to me.&lt;/P&gt;</description>
    <pubDate>Fri, 06 Oct 2023 16:45:34 GMT</pubDate>
    <dc:creator>Sahir_Maharaj</dc:creator>
    <dc:date>2023-10-06T16:45:34Z</dc:date>
    <item>
      <title>Matrix Calculation on 1st and 2nd Level</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Matrix-Calculation-on-1st-and-2nd-Level/m-p/3459717#M131959</link>
      <description>&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table that has data arranged into main sections and subsections as shown below.&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#3366FF"&gt;&lt;STRONG&gt;Main Section&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#3366FF"&gt;&lt;STRONG&gt;Sub Section&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#3366FF"&gt;&lt;STRONG&gt;Value&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Section A&lt;/TD&gt;&lt;TD&gt;Sub Section 1&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Section A&lt;/TD&gt;&lt;TD&gt;Sub Section 2&lt;/TD&gt;&lt;TD&gt;9&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Section A&lt;/TD&gt;&lt;TD&gt;Sub Section 3&lt;/TD&gt;&lt;TD&gt;21&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Section B&lt;/TD&gt;&lt;TD&gt;Sub Section 1&lt;/TD&gt;&lt;TD&gt;22&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Section B&lt;/TD&gt;&lt;TD&gt;Sub Section 2&lt;/TD&gt;&lt;TD&gt;75&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want create and measure that will show the ratio of the total value of each main section as well as the ratio of its subsections compared to the highest total across all other sections when expanded in a matrix visual.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So far, my measure only shows the ratio of the main section total compared to the maximum total in that table,&lt;/P&gt;&lt;P&gt;how do I ensure that when I expand to the subsections under their parent sections, the ratio calculation persists for each individual value of the subsections.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2023 14:30:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Matrix-Calculation-on-1st-and-2nd-Level/m-p/3459717#M131959</guid>
      <dc:creator>BOkungbure</dc:creator>
      <dc:date>2023-10-04T14:30:47Z</dc:date>
    </item>
    <item>
      <title>Re: Matrix Calculation on 1st and 2nd Level</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Matrix-Calculation-on-1st-and-2nd-Level/m-p/3464334#M132186</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="621585" data-lia-user-login="BOkungbure" class="lia-mention lia-mention-user"&gt;BOkungbure&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please try this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1.&amp;nbsp;Calculate the Maximum Total across all Sections&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Max Total Value = 
MAXX(
    ALL('YourTableName'[Main Section]),
    SUMX(
        FILTER(
            'YourTableName',
            'YourTableName'[Main Section] = EARLIER('YourTableName'[Main Section])
        ),
        'YourTableName'[Value]
    )
)&lt;/LI-CODE&gt;&lt;P&gt;2.&amp;nbsp;Calculate the Ratio&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Ratio = 
VAR MainSectionTotal = 
SUMX(
    FILTER(
        'YourTableName',
        'YourTableName'[Main Section] = EARLIER('YourTableName'[Main Section])
    ),
    'YourTableName'[Value]
)

VAR CurrentValue = 
IF(
    ISINSCOPE('YourTableName'[Sub Section]),
    SUM('YourTableName'[Value]),
    MainSectionTotal
)

RETURN
DIVIDE(CurrentValue, [Max Total Value])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Should you require any further assistance, feel free to reach out to me.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2023 16:45:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Matrix-Calculation-on-1st-and-2nd-Level/m-p/3464334#M132186</guid>
      <dc:creator>Sahir_Maharaj</dc:creator>
      <dc:date>2023-10-06T16:45:34Z</dc:date>
    </item>
    <item>
      <title>Re: Matrix Calculation on 1st and 2nd Level</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Matrix-Calculation-on-1st-and-2nd-Level/m-p/3502829#M134336</link>
      <description>&lt;P&gt;Thanks Sahir,&lt;BR /&gt;This solution was super helpful, ISINSCOPE was the missing piece&lt;/P&gt;</description>
      <pubDate>Sat, 28 Oct 2023 19:41:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Matrix-Calculation-on-1st-and-2nd-Level/m-p/3502829#M134336</guid>
      <dc:creator>BOkungbure</dc:creator>
      <dc:date>2023-10-28T19:41:15Z</dc:date>
    </item>
  </channel>
</rss>

