<?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: Bar Chart Group By in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bar-Chart-Group-By/m-p/3352269#M125895</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="255423" data-lia-user-login="TimmK" class="lia-mention lia-mention-user"&gt;TimmK&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need to create a table with data generateseries from 0 to max value (60) for X aixs in column chart.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;X aixs = 
VAR _SUMMARIZE =
    SUMMARIZE (
        ALL ( 'Piece' ),
        'Piece'[Piece Key],
        "SumDuration", SUM ( 'Piece'[Duration] )
    )
RETURN
    GENERATESERIES ( 0, MAXX ( _SUMMARIZE, [SumDuration] ), 1 )&lt;/LI-CODE&gt;
&lt;P&gt;Measure:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Count = 
VAR _SUMMARIZE =
    SUMMARIZE (
        ALL ( 'Piece' ),
        'Piece'[Piece Key],
        "SumDuration", SUM ( 'Piece'[Duration] )
    )
RETURN
    COUNTAX (
        FILTER ( _SUMMARIZE, [SumDuration] = MAX ( 'X aixs'[X aixs] ) ),
        [Piece Key]
    )&lt;/LI-CODE&gt;
&lt;P&gt;Result is as below.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
    <pubDate>Thu, 27 Jul 2023 03:14:52 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-07-27T03:14:52Z</dc:date>
    <item>
      <title>Bar Chart Group By</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bar-Chart-Group-By/m-p/3348809#M125743</link>
      <description>&lt;P&gt;I have the simple FACT table "Piece" with the columns "Piece Key" and "Duration". A piece key may occur multiple times (as seen in the left table below). Yet, I want to group by "Piece Key" to get the summed duration per piece (as seen in the right table below; 407436 is summed to 60)&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;This works fine so far.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The DAX code I use for grouping by "Piece Key" is the following:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Duration SUM = 
CALCULATE(
    SUMX(
        SUMMARIZE('Piece', 'Piece'[Piece Key], "SumDuration", SUM('Piece'[Duration])),
        [SumDuration]
    )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yet, I want to show the distribution in the sense of frequency per summed duration in a bar chart. But it does not work, I cannot drag &amp;amp; drop my measure with the summed duration by piece key into the x-axis field. How can I do this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can only use duration for each row, so it counts the value "30" twice, instead of summing it up to "60" and then counting "1".&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2023 13:15:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bar-Chart-Group-By/m-p/3348809#M125743</guid>
      <dc:creator>TimmK</dc:creator>
      <dc:date>2023-07-25T13:15:07Z</dc:date>
    </item>
    <item>
      <title>Re: Bar Chart Group By</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bar-Chart-Group-By/m-p/3350996#M125830</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="255423" data-lia-user-login="TimmK" class="lia-mention lia-mention-user"&gt;TimmK&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Why don't you just create an additional table and use its [SUM Duration] column to create the bar chart you need?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Extra Table = SUMMARIZE ( Piece, [Piece Key], "SUM Duration", SUM ( Piece[Duation] ) )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;Best Regards, &lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;Alexander&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;&lt;A href="https://youtube.com/@powerbi-vlog" target="_blank"&gt;My YouTube vlog in English&lt;/A&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;&lt;A href="https://youtube.com/@pbi-vlog" target="_blank"&gt;My YouTube vlog in Russian&lt;/A&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2023 12:12:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bar-Chart-Group-By/m-p/3350996#M125830</guid>
      <dc:creator>barritown</dc:creator>
      <dc:date>2023-07-26T12:12:42Z</dc:date>
    </item>
    <item>
      <title>Re: Bar Chart Group By</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bar-Chart-Group-By/m-p/3352269#M125895</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="255423" data-lia-user-login="TimmK" class="lia-mention lia-mention-user"&gt;TimmK&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need to create a table with data generateseries from 0 to max value (60) for X aixs in column chart.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;X aixs = 
VAR _SUMMARIZE =
    SUMMARIZE (
        ALL ( 'Piece' ),
        'Piece'[Piece Key],
        "SumDuration", SUM ( 'Piece'[Duration] )
    )
RETURN
    GENERATESERIES ( 0, MAXX ( _SUMMARIZE, [SumDuration] ), 1 )&lt;/LI-CODE&gt;
&lt;P&gt;Measure:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Count = 
VAR _SUMMARIZE =
    SUMMARIZE (
        ALL ( 'Piece' ),
        'Piece'[Piece Key],
        "SumDuration", SUM ( 'Piece'[Duration] )
    )
RETURN
    COUNTAX (
        FILTER ( _SUMMARIZE, [SumDuration] = MAX ( 'X aixs'[X aixs] ) ),
        [Piece Key]
    )&lt;/LI-CODE&gt;
&lt;P&gt;Result is as below.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2023 03:14:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bar-Chart-Group-By/m-p/3352269#M125895</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-07-27T03:14:52Z</dc:date>
    </item>
  </channel>
</rss>

