<?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: Grouped bar aggregation by month &amp;amp; year in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Grouped-bar-aggregation-by-month-amp-year/m-p/1942865#M77696</link>
    <description>&lt;P&gt;After taking a few days away from this, I was able to see things more clearly.&amp;nbsp; Here's the result, and my expression.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gshockxc_0-1655124990283.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/81625iA9D80D4C40CC1F44/image-size/medium?v=v2&amp;amp;px=400" role="button" title="gshockxc_0-1655124990283.png" alt="gshockxc_0-1655124990283.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;If(Year = Year(vToday)-1, Aggr(sum ( Amount/1000), Year, Month), If(Year = Year(vToday), Aggr(sum ( Amount/1000), Year, Month)))&lt;/P&gt;</description>
    <pubDate>Mon, 13 Jun 2022 12:57:22 GMT</pubDate>
    <dc:creator>gshockxc</dc:creator>
    <dc:date>2022-06-13T12:57:22Z</dc:date>
    <item>
      <title>Grouped bar aggregation by month &amp; year</title>
      <link>https://community.qlik.com/t5/App-Development/Grouped-bar-aggregation-by-month-amp-year/m-p/1942413#M77625</link>
      <description>&lt;P&gt;I have been away from Qlik for a few years and my skills have gotten really rusty.&amp;nbsp; I am trying to create a grouped bar chart that shows the sums by month and compares the current year and last year.&lt;/P&gt;
&lt;P&gt;It should like this from Excel:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gshockxc_0-1654904344330.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/81536i8C48D22E0043D3A9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="gshockxc_0-1654904344330.png" alt="gshockxc_0-1654904344330.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;However, this is the best I can do in Qlik.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gshockxc_1-1654904391673.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/81537i17170F28937B801B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="gshockxc_1-1654904391673.png" alt="gshockxc_1-1654904391673.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;My Expression is below:&amp;nbsp;Aggr(sum ( Amount/1000), Year, Month)&lt;/P&gt;
&lt;P&gt;What am I doing wrong?&lt;/P&gt;
&lt;P&gt;Thank you in advance for your help.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jun 2022 23:42:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Grouped-bar-aggregation-by-month-amp-year/m-p/1942413#M77625</guid>
      <dc:creator>gshockxc</dc:creator>
      <dc:date>2022-06-10T23:42:20Z</dc:date>
    </item>
    <item>
      <title>Re: Grouped bar aggregation by month &amp; year</title>
      <link>https://community.qlik.com/t5/App-Development/Grouped-bar-aggregation-by-month-amp-year/m-p/1942427#M77630</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/166447"&gt;@gshockxc&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You have over complicated the expression, as the &lt;STRONG&gt;Aggr&lt;/STRONG&gt; is not required, as the dimensions are shown on the chart. You can also remove the&amp;nbsp;&lt;STRONG&gt;/1000&lt;/STRONG&gt; if you set the number format to&amp;nbsp;&lt;STRONG&gt;Auto&lt;/STRONG&gt; as that will then automatically put&amp;nbsp;&lt;STRONG&gt;K&lt;/STRONG&gt; on the legend if a number is over a certain amount (but show to the dollar if a single small transaction is selected).&lt;/P&gt;
&lt;P&gt;Change the expression to just be&amp;nbsp;&lt;STRONG&gt;sum(Amount)&lt;/STRONG&gt; and then change the order of the dimensions under the&amp;nbsp;&lt;STRONG&gt;Data&amp;nbsp;&lt;/STRONG&gt;properties. Do this simply by clicking and holding on&amp;nbsp;&lt;STRONG&gt;Month&lt;/STRONG&gt; and drag it above&amp;nbsp;&lt;STRONG&gt;Year&amp;nbsp;&lt;/STRONG&gt;(or vice versa).&lt;/P&gt;
&lt;P&gt;Hope that helps,&lt;/P&gt;
&lt;P&gt;Steve&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jun 2022 08:18:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Grouped-bar-aggregation-by-month-amp-year/m-p/1942427#M77630</guid>
      <dc:creator>stevedark</dc:creator>
      <dc:date>2022-06-11T08:18:21Z</dc:date>
    </item>
    <item>
      <title>Re: Grouped bar aggregation by month &amp; year</title>
      <link>https://community.qlik.com/t5/App-Development/Grouped-bar-aggregation-by-month-amp-year/m-p/1942444#M77632</link>
      <description>&lt;P&gt;Thanks for the quick reply.&amp;nbsp; I agree that your suggestions should work, and I've done similar in Qlikview (as I recall), but it's not working the same in Qliksense, or I'm doing something wrong.&amp;nbsp; I tried your suggestions to change the number formatting to Auto, and I'm not really happy with the result.&amp;nbsp; The Y-axis values go higher than necessary for the range of data that I'm looking at.&amp;nbsp; Is there a way to change the formatting so that I can get something like $2M, $4M, etc?&lt;/P&gt;
&lt;P&gt;I modified the Measure to be &lt;EM&gt;sum(Amount)&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Here's the chart result, note that I have limited the range of values to 4, and the dimensions are shown below.&amp;nbsp; Otherwise the chart displays all past years, which have '$0' values.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gshockxc_0-1654949685106.png" style="width: 362px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/81546i397D9B431C71FCDF/image-dimensions/362x222?v=v2" width="362" height="222" role="button" title="gshockxc_0-1654949685106.png" alt="gshockxc_0-1654949685106.png" /&gt;&lt;/span&gt; &lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gshockxc_1-1654949698832.png" style="width: 170px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/81547iF4B7941B38E0330B/image-dimensions/170x220?v=v2" width="170" height="220" role="button" title="gshockxc_1-1654949698832.png" alt="gshockxc_1-1654949698832.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have expanded the number of values to 20, and reversed Month and Year, I get this:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gshockxc_2-1654949833309.png" style="width: 413px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/81548i53D0A5C657031FBD/image-dimensions/413x211?v=v2" width="413" height="211" role="button" title="gshockxc_2-1654949833309.png" alt="gshockxc_2-1654949833309.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gshockxc_3-1654949850713.png" style="width: 132px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/81549iAC0BB7BA79FC97DE/image-dimensions/132x194?v=v2" width="132" height="194" role="button" title="gshockxc_3-1654949850713.png" alt="gshockxc_3-1654949850713.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The Auto formatting works better here, but I'd still like to get the scale showing $2M, $4M, etc, if possible.&lt;/P&gt;
&lt;P&gt;Thanks in advance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jun 2022 12:23:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Grouped-bar-aggregation-by-month-amp-year/m-p/1942444#M77632</guid>
      <dc:creator>gshockxc</dc:creator>
      <dc:date>2022-06-11T12:23:37Z</dc:date>
    </item>
    <item>
      <title>Re: Grouped bar aggregation by month &amp; year</title>
      <link>https://community.qlik.com/t5/App-Development/Grouped-bar-aggregation-by-month-amp-year/m-p/1942463#M77636</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/166447"&gt;@gshockxc&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may be able to lose the empty years by unticking&amp;nbsp;&lt;STRONG&gt;Include Zero Values&amp;nbsp;&lt;/STRONG&gt;under the&amp;nbsp;&lt;STRONG&gt;Add Ons&lt;/STRONG&gt; /&amp;nbsp;&lt;STRONG&gt;Data Handling&lt;/STRONG&gt; menu.&lt;/P&gt;
&lt;P&gt;Another approach for this is to exclude non zero values in Set Analysis in the expression:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;sum(Amount)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;To show the dollar sign on the axis and have it scale appropriately takes a bit of work, but it is possible. You need to find the max value for any month and then decide how to divide the value.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;=num(sum(Amount) /&lt;BR /&gt;&lt;/STRONG&gt;&lt;STRONG&gt;if(max(aggr(sum(Amount), Month, Year)) &amp;lt; 1000, 1,&lt;BR /&gt;if(max(aggr(sum(Amount), Month, Year)) &amp;lt; 1000000, 1000,&lt;BR /&gt;1000000))&lt;BR /&gt;&lt;/STRONG&gt;&lt;STRONG&gt;, '$#,##0' &amp;amp; &lt;BR /&gt;if(max(aggr(sum(Amount), Month, Year)) &amp;lt; 1000, '',&lt;BR /&gt;if(max(aggr(sum(Amount), Month, Year)) &amp;lt; 1000000, '.0 $K',&lt;BR /&gt;'.0 $M')))&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;You would then need to leave the number format to Auto for the denominator to show.&lt;/P&gt;
&lt;P&gt;Regarding the scale on the Y axis, it is best to leave this to auto size. You can make the gaps narrower, and make the bars reach higher to the top of the chart by selecting&amp;nbsp;&lt;STRONG&gt;Narrow&lt;/STRONG&gt; under &lt;STRONG&gt;Appearance&lt;/STRONG&gt; and&amp;nbsp;&lt;STRONG&gt;Y-Axis&lt;/STRONG&gt; and&amp;nbsp;&lt;STRONG&gt;Scale&lt;/STRONG&gt;. Sometimes it can still end up wider than you might like and not near enough the top, but setting a manual scale (using a similar&amp;nbsp;&lt;STRONG&gt;aggr&lt;/STRONG&gt; statement to above) is fiddly and can give odd results.&lt;/P&gt;
&lt;P&gt;Hope that helps.&lt;/P&gt;
&lt;P&gt;Steve&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jun 2022 19:32:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Grouped-bar-aggregation-by-month-amp-year/m-p/1942463#M77636</guid>
      <dc:creator>stevedark</dc:creator>
      <dc:date>2022-06-11T19:32:39Z</dc:date>
    </item>
    <item>
      <title>Re: Grouped bar aggregation by month &amp; year</title>
      <link>https://community.qlik.com/t5/App-Development/Grouped-bar-aggregation-by-month-amp-year/m-p/1942865#M77696</link>
      <description>&lt;P&gt;After taking a few days away from this, I was able to see things more clearly.&amp;nbsp; Here's the result, and my expression.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gshockxc_0-1655124990283.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/81625iA9D80D4C40CC1F44/image-size/medium?v=v2&amp;amp;px=400" role="button" title="gshockxc_0-1655124990283.png" alt="gshockxc_0-1655124990283.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;If(Year = Year(vToday)-1, Aggr(sum ( Amount/1000), Year, Month), If(Year = Year(vToday), Aggr(sum ( Amount/1000), Year, Month)))&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jun 2022 12:57:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Grouped-bar-aggregation-by-month-amp-year/m-p/1942865#M77696</guid>
      <dc:creator>gshockxc</dc:creator>
      <dc:date>2022-06-13T12:57:22Z</dc:date>
    </item>
  </channel>
</rss>

