<?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: Need name of category with the most values in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-name-of-category-with-the-most-values/m-p/2820388#M89546</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Please check the below picture and the attached pbix file.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;expected result measure: =
VAR _gendertablewithcounting =
    ADDCOLUMNS (
        DISTINCT ( Data[Gender] ),
        "@count", CALCULATE ( COUNTROWS ( Data ) )
    )
VAR _groupbymaxcounting =
    GROUPBY (
        _gendertablewithcounting,
        Data[Gender],
        "@maxcount", MAXX ( CURRENTGROUP (), [@count] )
    )
RETURN
    MAXX ( _groupbymaxcounting, Data[Gender] )
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 05 Oct 2022 16:36:15 GMT</pubDate>
    <dc:creator>Jihwan_Kim</dc:creator>
    <dc:date>2022-10-05T16:36:15Z</dc:date>
    <item>
      <title>Need name of category with the most values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-name-of-category-with-the-most-values/m-p/2820292#M89539</link>
      <description>&lt;P&gt;I have a table of clients and their genders, and I need to identify the gender with the most values, so from a table like this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Client 1 - Male&lt;/P&gt;&lt;P&gt;Client 2 - Male&lt;/P&gt;&lt;P&gt;Client 3 - Female&lt;/P&gt;&lt;P&gt;Client 4 - Male&lt;/P&gt;&lt;P&gt;Client 5 - Male&lt;/P&gt;&lt;P&gt;Client 6 - Male&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to produce the word "Male" as a measure, because there are 5 males and only 1 female. I can't use visual filters to achieve this.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Using RANK, I got Male = 1 and Female = 2, but I'm not sure how to take that output and produce the word "Male".&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is wrong with my approach? Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2022 15:56:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-name-of-category-with-the-most-values/m-p/2820292#M89539</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-10-05T15:56:15Z</dc:date>
    </item>
    <item>
      <title>Re: Need name of category with the most values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-name-of-category-with-the-most-values/m-p/2820388#M89546</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Please check the below picture and the attached pbix file.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;expected result measure: =
VAR _gendertablewithcounting =
    ADDCOLUMNS (
        DISTINCT ( Data[Gender] ),
        "@count", CALCULATE ( COUNTROWS ( Data ) )
    )
VAR _groupbymaxcounting =
    GROUPBY (
        _gendertablewithcounting,
        Data[Gender],
        "@maxcount", MAXX ( CURRENTGROUP (), [@count] )
    )
RETURN
    MAXX ( _groupbymaxcounting, Data[Gender] )
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2022 16:36:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-name-of-category-with-the-most-values/m-p/2820388#M89546</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2022-10-05T16:36:15Z</dc:date>
    </item>
    <item>
      <title>Re: Need name of category with the most values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-name-of-category-with-the-most-values/m-p/2820389#M89547</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please try&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Max Gender =
MAXX (
    TOPN (
        1,
        SUMMARIZE ( 'Table', 'Table'[Gender], "@Count", COUNTROWS ( 'Table' ) ),
        [@Count]
    ),
    'Table'[Gender]
)&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 05 Oct 2022 16:36:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-name-of-category-with-the-most-values/m-p/2820389#M89547</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-10-05T16:36:18Z</dc:date>
    </item>
    <item>
      <title>Re: Need name of category with the most values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-name-of-category-with-the-most-values/m-p/2820649#M89561</link>
      <description>&lt;P&gt;This worked great - I was able to even add a filter on to COUNTROWS to remove blanks from consideration. Thanks so much!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Didn't try the other option, that might work as well.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2022 19:00:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-name-of-category-with-the-most-values/m-p/2820649#M89561</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-10-05T19:00:03Z</dc:date>
    </item>
  </channel>
</rss>

