<?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: Create bar-plot/count-plot when having one row that contains aggregated data in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Create-bar-plot-count-plot-when-having-one-row-that-contains/m-p/1883184#M72708</link>
    <description>&lt;P&gt;No, the `a1`,`a2`,`a3` etc are the dimensions/columns of my table&lt;/P&gt;</description>
    <pubDate>Thu, 20 Jan 2022 07:53:15 GMT</pubDate>
    <dc:creator>jakobjensen</dc:creator>
    <dc:date>2022-01-20T07:53:15Z</dc:date>
    <item>
      <title>Create bar-plot/count-plot when having one row that contains aggregated data</title>
      <link>https://community.qlik.com/t5/App-Development/Create-bar-plot-count-plot-when-having-one-row-that-contains/m-p/1882446#M72658</link>
      <description>&lt;P&gt;I have a table (from a SQL-table) looking like this&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;
&lt;LI-CODE lang="markup"&gt;#my_table

a1 a2  a3  b1  b2  c0  c1 c2 c3
--+--+----+---+---+---+--+--+--
20 15  10 18.5 13  2   0  23  30&lt;/LI-CODE&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;and I want to make a barchart of the "a" the "b" and the "c" groups i.e three different bar-plots where the y-axis is the value, and the x-axis is the name e.g for the "a"&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jakobjensen_0-1642532440312.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/70441i3ED072254A7BE906/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jakobjensen_0-1642532440312.png" alt="jakobjensen_0-1642532440312.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;what is the best way to do that?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jan 2022 19:11:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Create-bar-plot-count-plot-when-having-one-row-that-contains/m-p/1882446#M72658</guid>
      <dc:creator>jakobjensen</dc:creator>
      <dc:date>2022-01-18T19:11:22Z</dc:date>
    </item>
    <item>
      <title>Re: Create bar-plot/count-plot when having one row that contains aggregated data</title>
      <link>https://community.qlik.com/t5/App-Development/Create-bar-plot-count-plot-when-having-one-row-that-contains/m-p/1882782#M72677</link>
      <description>&lt;P&gt;If I understand it correctly you want to group your first dimension by the first character?&lt;/P&gt;
&lt;P&gt;there aseveral possible solutions: assumed your first field (a1,a2,b1,...)&amp;nbsp; is called "Dim1" and your second line (20,15,10,...) ist calles "Measure1"&lt;/P&gt;
&lt;P&gt;1) create a new Field: Left(Dim1,1) as Group1&amp;nbsp; //takes the first character (from left)&lt;/P&gt;
&lt;P&gt;2) if your data model is more complex and you cannot use the first letter try SubField() or Wildmatch() -&amp;gt; read the onlin help for further information&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jan 2022 12:45:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Create-bar-plot-count-plot-when-having-one-row-that-contains/m-p/1882782#M72677</guid>
      <dc:creator>chris_djih</dc:creator>
      <dc:date>2022-01-19T12:45:56Z</dc:date>
    </item>
    <item>
      <title>Re: Create bar-plot/count-plot when having one row that contains aggregated data</title>
      <link>https://community.qlik.com/t5/App-Development/Create-bar-plot-count-plot-when-having-one-row-that-contains/m-p/1883184#M72708</link>
      <description>&lt;P&gt;No, the `a1`,`a2`,`a3` etc are the dimensions/columns of my table&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jan 2022 07:53:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Create-bar-plot-count-plot-when-having-one-row-that-contains/m-p/1883184#M72708</guid>
      <dc:creator>jakobjensen</dc:creator>
      <dc:date>2022-01-20T07:53:15Z</dc:date>
    </item>
    <item>
      <title>Re: Create bar-plot/count-plot when having one row that contains aggregated data</title>
      <link>https://community.qlik.com/t5/App-Development/Create-bar-plot-count-plot-when-having-one-row-that-contains/m-p/1883238#M72716</link>
      <description>&lt;P&gt;Ok, then you may want to try the crosstable transformation:&lt;BR /&gt;the columns will be transformed into one Dimension with their respective assigned value as a new measure-Field.&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;LI-CODE lang="markup"&gt;// First we need a leading column (e.g. a date marker)
myNewTable:
Load *,
	today() as date
resident myTable;

//then we transform all the other columns into one dimension
myCrosstable:
//the "1" defines how many leading fields are fixed (1-&amp;gt; date).
//"columns" is the name of the new created dimension
//"Value" is the field were the former vlaues land in.
Crosstable([Columns], [Value], 1) 
LOAD
	[date],/* need 1 dim that stays*/ 
	[a1],[a2],[a3],[b1],[b2],[c0],[c1],[c2] 
Resident myNewTable; 

//To fullfill your tast of Gorups, just create a new field.
finalTable:
Load *,
	left(Columns,1)	as Group
Resident myCrosstable;

//CleanUp table to avoid synth. Keys
drop tables myCrosstable,myTable,myNewTable;&lt;/LI-CODE&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;final table looks like this:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="grafik.png" style="width: 200px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/70599iAC28FD78F269EFC3/image-size/small?v=v2&amp;amp;px=200" role="button" title="grafik.png" alt="grafik.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Now you can easily make a bar chart with "Group" as dimension and "Sum(Value)" as Measure.&lt;BR /&gt;or if you just want the a's in one chart: "Columns" as dimension and "Sum( {&amp;lt;Group={'a'}&amp;gt;} Value)" as Measure&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jan 2022 09:51:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Create-bar-plot-count-plot-when-having-one-row-that-contains/m-p/1883238#M72716</guid>
      <dc:creator>chris_djih</dc:creator>
      <dc:date>2022-01-20T09:51:39Z</dc:date>
    </item>
  </channel>
</rss>

