<?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: Count per group of summarizecolumns in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-per-group-of-summarizecolumns/m-p/3641090#M140962</link>
    <description>&lt;P&gt;You are correct, thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However my case is a bit more complicated as I have query with 3 dimensions (Continent/CountryRegion/City) part of paginated report. I would like to highlight only those child groups where there is 1 item.&lt;/P&gt;&lt;P&gt;So I need to get a count of items per each parent group.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this case, let's use different query, to be more exact.&lt;/P&gt;&lt;P&gt;EVALUATE&lt;BR /&gt;VAR __t1 =&lt;BR /&gt;SUMMARIZECOLUMNS (&lt;BR /&gt;Customer[Continent],&lt;BR /&gt;Customer[CountryRegion],&lt;BR /&gt;Customer[City],&lt;BR /&gt;"Amount", [Sales Amount]&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;RETURN&lt;BR /&gt;GROUPBY(&lt;BR /&gt;__t1,&lt;BR /&gt;Customer[Continent],&lt;BR /&gt;Customer[CountryRegion],&lt;BR /&gt;"Count" , countX(CURRENTGROUP(), Customer[CountryRegion] )&lt;BR /&gt;) ORDER BY Customer[Continent] DESC&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Which brings me this&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Result I am looking for is&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And in a case where I have 3 dimensions&lt;BR /&gt;EVALUATE&lt;BR /&gt;VAR __t1 =&lt;BR /&gt;SUMMARIZECOLUMNS (&lt;BR /&gt;Customer[Continent],&lt;BR /&gt;Customer[CountryRegion],&lt;BR /&gt;Customer[City],&lt;BR /&gt;"Amount", [Sales Amount]&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;RETURN&lt;BR /&gt;GROUPBY(&lt;BR /&gt;__t1,&lt;BR /&gt;Customer[Continent],&lt;BR /&gt;Customer[CountryRegion],&lt;BR /&gt;Customer[City],&lt;BR /&gt;"Count" , countX(CURRENTGROUP(), Customer[City] )&lt;BR /&gt;) ORDER BY Customer[Continent] DESC&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I get&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I would like to see&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How should I approach this?&lt;BR /&gt;Thank you!&lt;/P&gt;</description>
    <pubDate>Tue, 16 Jan 2024 13:14:28 GMT</pubDate>
    <dc:creator>Mikeysw</dc:creator>
    <dc:date>2024-01-16T13:14:28Z</dc:date>
    <item>
      <title>Count per group of summarizecolumns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-per-group-of-summarizecolumns/m-p/3639411#M140879</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;When using Summarizecolumns, I would like to get count of how manu times each child group appears.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, I have this DAX query&lt;/P&gt;&lt;DIV class=""&gt;SUMMARIZECOLUMNS&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;(&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Date'[Calendar Year],&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Product'[Color],&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"Amount",&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;[Sales Amount],&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp; &amp;nbsp; "Quantity",Sum(Sales[Quantity]))&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like then to count the result and display how many times each color appears for each year.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried with groupby and currentgroup but I get double results as I have two measures.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 15 Jan 2024 19:01:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-per-group-of-summarizecolumns/m-p/3639411#M140879</guid>
      <dc:creator>Mikeysw</dc:creator>
      <dc:date>2024-01-15T19:01:27Z</dc:date>
    </item>
    <item>
      <title>Re: Count per group of summarizecolumns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-per-group-of-summarizecolumns/m-p/3639449#M140880</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="674909" data-lia-user-login="Mikeysw" class="lia-mention lia-mention-user"&gt;Mikeysw&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;You are grouping by Year and Color, then calculate two meaures so you should get each color appearing once. Here is the result:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;EVALUATE&lt;/SP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&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; 'Date'[Year],&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; 'Product'[Color],&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"ColorCount"&lt;/SPAN&gt;&lt;SPAN&gt; , &lt;/SPAN&gt;&lt;SPAN&gt;SUMX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;CURRENTGROUP&lt;/SPAN&gt;&lt;SPAN&gt;(), &lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt; )&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;img /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 15 Jan 2024 19:25:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-per-group-of-summarizecolumns/m-p/3639449#M140880</guid>
      <dc:creator>Fowmy</dc:creator>
      <dc:date>2024-01-15T19:25:33Z</dc:date>
    </item>
    <item>
      <title>Re: Count per group of summarizecolumns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-per-group-of-summarizecolumns/m-p/3641090#M140962</link>
      <description>&lt;P&gt;You are correct, thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However my case is a bit more complicated as I have query with 3 dimensions (Continent/CountryRegion/City) part of paginated report. I would like to highlight only those child groups where there is 1 item.&lt;/P&gt;&lt;P&gt;So I need to get a count of items per each parent group.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this case, let's use different query, to be more exact.&lt;/P&gt;&lt;P&gt;EVALUATE&lt;BR /&gt;VAR __t1 =&lt;BR /&gt;SUMMARIZECOLUMNS (&lt;BR /&gt;Customer[Continent],&lt;BR /&gt;Customer[CountryRegion],&lt;BR /&gt;Customer[City],&lt;BR /&gt;"Amount", [Sales Amount]&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;RETURN&lt;BR /&gt;GROUPBY(&lt;BR /&gt;__t1,&lt;BR /&gt;Customer[Continent],&lt;BR /&gt;Customer[CountryRegion],&lt;BR /&gt;"Count" , countX(CURRENTGROUP(), Customer[CountryRegion] )&lt;BR /&gt;) ORDER BY Customer[Continent] DESC&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Which brings me this&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Result I am looking for is&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And in a case where I have 3 dimensions&lt;BR /&gt;EVALUATE&lt;BR /&gt;VAR __t1 =&lt;BR /&gt;SUMMARIZECOLUMNS (&lt;BR /&gt;Customer[Continent],&lt;BR /&gt;Customer[CountryRegion],&lt;BR /&gt;Customer[City],&lt;BR /&gt;"Amount", [Sales Amount]&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;RETURN&lt;BR /&gt;GROUPBY(&lt;BR /&gt;__t1,&lt;BR /&gt;Customer[Continent],&lt;BR /&gt;Customer[CountryRegion],&lt;BR /&gt;Customer[City],&lt;BR /&gt;"Count" , countX(CURRENTGROUP(), Customer[City] )&lt;BR /&gt;) ORDER BY Customer[Continent] DESC&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I get&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I would like to see&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How should I approach this?&lt;BR /&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2024 13:14:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-per-group-of-summarizecolumns/m-p/3641090#M140962</guid>
      <dc:creator>Mikeysw</dc:creator>
      <dc:date>2024-01-16T13:14:28Z</dc:date>
    </item>
  </channel>
</rss>

