<?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: Return Top Result in Matrix using DAX in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-Top-Result-in-Matrix-using-DAX/m-p/2517780#M70071</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="33343" data-lia-user-login="AltGr9" class="lia-mention lia-mention-user"&gt;AltGr9&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;Top Site =&lt;BR /&gt;MAXX ( FILTER ( TableName,&amp;nbsp;&lt;SPAN&gt;TableName[Amont]=MAX(TableName[Amont]), TableName[Site])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;please make sure to enable "Values on rows"&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 16 May 2022 14:01:01 GMT</pubDate>
    <dc:creator>tamerj1</dc:creator>
    <dc:date>2022-05-16T14:01:01Z</dc:date>
    <item>
      <title>Return Top Result in Matrix using DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-Top-Result-in-Matrix-using-DAX/m-p/2517333#M70049</link>
      <description>&lt;P&gt;Hi I have a table of data that looks like this:&lt;/P&gt;&lt;P&gt;&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;And when I put it into a Matrix it looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;And what I'm looking for is a Matrix that looks like this:&lt;/P&gt;&lt;P&gt;&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;I've tried various things in the .pbix attached but none of them work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like to achieve it using DAX if possible, so that I can add to it in future. Can you help?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://infinis-my.sharepoint.com/:u:/p/john_altamura/ERe8yEjSdkFLo5h3NbtwcmkBIHXqZiBnw05Qsr__C65-9w?e=gdn4UE" target="_blank" rel="noopener"&gt;https://infinis-my.sharepoint.com/:u:/p/john_altamura/ERe8yEjSdkFLo5h3NbtwcmkBIHXqZiBnw05Qsr__C65-9w?e=gdn4UE&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 May 2022 11:00:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-Top-Result-in-Matrix-using-DAX/m-p/2517333#M70049</guid>
      <dc:creator>AltGr9</dc:creator>
      <dc:date>2022-05-16T11:00:58Z</dc:date>
    </item>
    <item>
      <title>Re: Return Top Result in Matrix using DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-Top-Result-in-Matrix-using-DAX/m-p/2517765#M70070</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="33343" data-lia-user-login="AltGr9" class="lia-mention lia-mention-user"&gt;AltGr9&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Add the Class_new and Row Header columns to the data table&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Class_new = 
SWITCH(
    TRUE(),
    [Class] = "Class 1", "Class A",
    [Class] = "Class 2", "Class B",
    [Class] = "Class 3", "Class C")
---------------------------------------
Row Header = "Top Site"&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Follow these steps&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Тop Site = 
VAR _maxdate =
    CALCULATE ( MAX ( 'Data'[Amount] ), ALLEXCEPT ( 'Data', 'Data'[Class_new] ) )
RETURN
    CALCULATE (
        MAX ( 'Data'[Site] ),
        FILTER (
            'Data',
            'Data'[Class] = MAX ( 'Data'[Class] )
                &amp;amp;&amp;amp; 'Data'[Amount] = _maxdate
        )
    )&lt;/LI-CODE&gt;&lt;P&gt;&lt;img /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 May 2022 13:57:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-Top-Result-in-Matrix-using-DAX/m-p/2517765#M70070</guid>
      <dc:creator>DimaMD</dc:creator>
      <dc:date>2022-05-16T13:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: Return Top Result in Matrix using DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-Top-Result-in-Matrix-using-DAX/m-p/2517780#M70071</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="33343" data-lia-user-login="AltGr9" class="lia-mention lia-mention-user"&gt;AltGr9&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;Top Site =&lt;BR /&gt;MAXX ( FILTER ( TableName,&amp;nbsp;&lt;SPAN&gt;TableName[Amont]=MAX(TableName[Amont]), TableName[Site])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;please make sure to enable "Values on rows"&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 May 2022 14:01:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Return-Top-Result-in-Matrix-using-DAX/m-p/2517780#M70071</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-05-16T14:01:01Z</dc:date>
    </item>
  </channel>
</rss>

