<?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 Loading data grouping for particular value of a dimension in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Loading-data-grouping-for-particular-value-of-a-dimension/m-p/319666#M1198854</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a Orders table, stored in a QVD and to load, like this:&lt;/P&gt;&lt;P&gt;OrderID, OrderDescription, TotalOrderAmount, OrderYear, OrderMonth, MonthlyOrderedAmount.&lt;/P&gt;&lt;P&gt;An order can have one or more monthly lines for year. In the table, the primary key is composed of OrderID, OrderYear and OrderMonth.&lt;/P&gt;&lt;P&gt;I want to load the orders to have the monthly OrderedAmount on columns to show them in a tabular format. It is important to show the OrderID, the OrderDescription and the TotalOrderAmount. This last amount is repeated for each monthly order row.&lt;/P&gt;&lt;P&gt;I think to use this code:&lt;/P&gt;&lt;P&gt;(pre-load into resident table Orders)&lt;/P&gt;&lt;P&gt;OrdersByMonth:&lt;/P&gt;&lt;P&gt;LOAD DISTINCT OrderID, OrderYear, OrderMonth, OrderDescription, TotalOrderAmount RESIDENT Orders;&lt;/P&gt;&lt;P&gt;INNER KEEP&lt;/P&gt;&lt;P&gt;LOAD OrderID, OrderYear, OrderMonth, SUM(MonthlyOrderedAmount) as JanuaryOrderedAmount RESIDENT Order WHERE OrderMonth = 1 GROUP BY OrderID, OrderYear, OrderMonth;&lt;/P&gt;&lt;P&gt;INNER KEEP&lt;/P&gt;&lt;P&gt;LOAD OrderID, OrderYear, OrderMonth, SUM(MonthlyOrderedAmount) as FebruaryOrderedAmount RESIDENT Order WHERE OrderMonth = 2 GROUP BY OrderID, OrderYear, OrderMonth;&lt;/P&gt;&lt;P&gt;INNER KEEP&lt;/P&gt;&lt;P&gt;LOAD OrderID, OrderYear, OrderMonth, SUM(MonthlyOrderedAmount) as MarchOrderedAmount RESIDENT Order WHERE OrderMonth = 3 GROUP BY OrderID, OrderYear, OrderMonth;&lt;/P&gt;&lt;P&gt;INNER KEEP ... and so on ...&lt;/P&gt;&lt;P&gt;Is this a good solution or is there a better one? Any helps to me, please?&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 09 Apr 2011 06:47:24 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-04-09T06:47:24Z</dc:date>
    <item>
      <title>Loading data grouping for particular value of a dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-data-grouping-for-particular-value-of-a-dimension/m-p/319666#M1198854</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a Orders table, stored in a QVD and to load, like this:&lt;/P&gt;&lt;P&gt;OrderID, OrderDescription, TotalOrderAmount, OrderYear, OrderMonth, MonthlyOrderedAmount.&lt;/P&gt;&lt;P&gt;An order can have one or more monthly lines for year. In the table, the primary key is composed of OrderID, OrderYear and OrderMonth.&lt;/P&gt;&lt;P&gt;I want to load the orders to have the monthly OrderedAmount on columns to show them in a tabular format. It is important to show the OrderID, the OrderDescription and the TotalOrderAmount. This last amount is repeated for each monthly order row.&lt;/P&gt;&lt;P&gt;I think to use this code:&lt;/P&gt;&lt;P&gt;(pre-load into resident table Orders)&lt;/P&gt;&lt;P&gt;OrdersByMonth:&lt;/P&gt;&lt;P&gt;LOAD DISTINCT OrderID, OrderYear, OrderMonth, OrderDescription, TotalOrderAmount RESIDENT Orders;&lt;/P&gt;&lt;P&gt;INNER KEEP&lt;/P&gt;&lt;P&gt;LOAD OrderID, OrderYear, OrderMonth, SUM(MonthlyOrderedAmount) as JanuaryOrderedAmount RESIDENT Order WHERE OrderMonth = 1 GROUP BY OrderID, OrderYear, OrderMonth;&lt;/P&gt;&lt;P&gt;INNER KEEP&lt;/P&gt;&lt;P&gt;LOAD OrderID, OrderYear, OrderMonth, SUM(MonthlyOrderedAmount) as FebruaryOrderedAmount RESIDENT Order WHERE OrderMonth = 2 GROUP BY OrderID, OrderYear, OrderMonth;&lt;/P&gt;&lt;P&gt;INNER KEEP&lt;/P&gt;&lt;P&gt;LOAD OrderID, OrderYear, OrderMonth, SUM(MonthlyOrderedAmount) as MarchOrderedAmount RESIDENT Order WHERE OrderMonth = 3 GROUP BY OrderID, OrderYear, OrderMonth;&lt;/P&gt;&lt;P&gt;INNER KEEP ... and so on ...&lt;/P&gt;&lt;P&gt;Is this a good solution or is there a better one? Any helps to me, please?&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Apr 2011 06:47:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-data-grouping-for-particular-value-of-a-dimension/m-p/319666#M1198854</guid>
      <dc:creator />
      <dc:date>2011-04-09T06:47:24Z</dc:date>
    </item>
    <item>
      <title>Loading data grouping for particular value of a dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-data-grouping-for-particular-value-of-a-dimension/m-p/319667#M1198855</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;It sounds to me that what you need is simply a Pivot table based on your month.&lt;/P&gt;&lt;P&gt;To do this go from your initial data set and add a new Chart. Select to display this in a Pivot view. Set the dimensions to be OrderDescription, OrderYear and OrderMonth. Add a single expression of MonthlyOrderedAmount. On the properties page check the values for Allow Pivotting and Always Fully Expanded.&lt;/P&gt;&lt;P&gt;Once your chart has been rendered you can drag the year to the top of the page (click and hold the label to do this). Then do the same for the Month field to drag it under the Year field.&lt;/P&gt;&lt;P&gt;If you like you can put totals in by selecting the Properties tab and clicking the Show Partial Sums box for both Year and Month dimensions.&lt;/P&gt;&lt;P&gt;You will probably want to have better formatted date dimensions, and this should be done in your initial load before writing to QVD, with something like this in your load script:&lt;/P&gt;&lt;P style="font-weight: bold"&gt;OrderYear as [Order Year],&lt;BR /&gt;Month(MakeDate(OrderYear, OrderMonth, 1)) as [Order Month],&lt;BR /&gt;Date(MakeDate(OrderYear, OrderMonth, 1), 'MMM-YY') as [Order Month Year],&lt;/P&gt;&lt;P&gt;Formatting the dimensions like this will make it easier to get the legends you want when you build more charts. Having a combined month year can be particularly useful.&lt;/P&gt;&lt;P&gt;Hope that helps,&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 10 Apr 2011 08:21:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-data-grouping-for-particular-value-of-a-dimension/m-p/319667#M1198855</guid>
      <dc:creator>stevedark</dc:creator>
      <dc:date>2011-04-10T08:21:12Z</dc:date>
    </item>
    <item>
      <title>Loading data grouping for particular value of a dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-data-grouping-for-particular-value-of-a-dimension/m-p/319668#M1198856</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Steve, thanks for your reply. Also I think to use a pivot table, but I have some doubts.&lt;/P&gt;&lt;P&gt;I need to show also OrderID, so the dimensions should be 1) OrderID, 2) OrderDescription, 3) OrderYear and 4) OrderMonth.&lt;/P&gt;&lt;P&gt;I need to show also the TotalOrderAmount: it isn't the sum of the monthly amount but it's an expected amount. Moreover I could need to show the monthly invoiced amount.&lt;/P&gt;&lt;P&gt;Now, in this case could a table box be better than a pivot chart?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 10 Apr 2011 21:22:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-data-grouping-for-particular-value-of-a-dimension/m-p/319668#M1198856</guid>
      <dc:creator />
      <dc:date>2011-04-10T21:22:37Z</dc:date>
    </item>
    <item>
      <title>Loading data grouping for particular value of a dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-data-grouping-for-particular-value-of-a-dimension/m-p/319669#M1198857</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;You can simply add the OrderID as one of the dimensions of the pivot, this will not cause any issues. You can also have two expressions in your pivot - the sum of the monthly amount and the sum of the total amount. I would imagine however that if you are including the TotalOrderAmount you will need to be very careful what partial sums you include - as you would not want to double count totals across months.&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 10 Apr 2011 21:59:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-data-grouping-for-particular-value-of-a-dimension/m-p/319669#M1198857</guid>
      <dc:creator>stevedark</dc:creator>
      <dc:date>2011-04-10T21:59:58Z</dc:date>
    </item>
    <item>
      <title>Loading data grouping for particular value of a dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-data-grouping-for-particular-value-of-a-dimension/m-p/319670#M1198858</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;You say me that with pivot chart I'm free to add other descriptive attributes that I must manage as a dimension, isn'it?&lt;/P&gt;&lt;P&gt;But if I use a pivot chart it couldn't be necessary to use a LOAD with JOIN to calculate the monthly order amounts (see my posted code), isn't it?&lt;/P&gt;&lt;P&gt;The TotalOrderAmount is an expected amount, but the MonthlyOrderAmount is an actual amount.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2011 07:26:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-data-grouping-for-particular-value-of-a-dimension/m-p/319670#M1198858</guid>
      <dc:creator />
      <dc:date>2011-04-11T07:26:10Z</dc:date>
    </item>
    <item>
      <title>Loading data grouping for particular value of a dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-data-grouping-for-particular-value-of-a-dimension/m-p/319671#M1198859</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have tried to use the pivot chart with the expanded dimensions. In the char the drag &amp;amp; drop is allowed but I cannot to move the Year dimension on the top. I want to show the monthy order amount on the columns:&lt;/P&gt;&lt;P&gt;1st col ... 2nd column ............. 3rd column ................ 4th col ... 5th column ..................... 6th column ....................... 7th column ...............................&lt;/P&gt;&lt;P&gt;OrderID ... OrderDescription ... TotalOrderAmount ... Year ....... JanuaryOrderAmount ... FebruaryOrderAmount ... MarchOrderAmount and so on&lt;/P&gt;&lt;P&gt;The representation should be like an Excel spreadsheet.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2011 08:14:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-data-grouping-for-particular-value-of-a-dimension/m-p/319671#M1198859</guid>
      <dc:creator />
      <dc:date>2011-04-11T08:14:55Z</dc:date>
    </item>
    <item>
      <title>Loading data grouping for particular value of a dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-data-grouping-for-particular-value-of-a-dimension/m-p/319672#M1198860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;From your further explanation it sounds like TotalOrderAmount should be another dimension, rather than an expression. It also sounds that Year does not need to be dragged about, but month does. You need to ensure that Allow Pivoting is selected on the Properties tab. Dragging dimensions can sometimes be fiddly getting things to anchor in the right place. As you drag the month you need to wait for a horizontal blue line to appear before letting go of your left mouse button.&lt;/P&gt;&lt;P&gt;If you upload an example of where you are at presently and an Excel representation of where you are trying to get to I can take a look at this for you.&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2011 11:33:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-data-grouping-for-particular-value-of-a-dimension/m-p/319672#M1198860</guid>
      <dc:creator>stevedark</dc:creator>
      <dc:date>2011-04-11T11:33:17Z</dc:date>
    </item>
    <item>
      <title>Loading data grouping for particular value of a dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-data-grouping-for-particular-value-of-a-dimension/m-p/319673#M1198861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;yes TotalOrderAmount for me is a dimension in the chart.&lt;/P&gt;&lt;P&gt;I'me able to place year and month dimensions in the right positions but after eight dimensions when I add a dimension it goes below year and month and I cannot move it correctly.&lt;/P&gt;&lt;P&gt;I attach an img. See Importo contratto below Anno (or Year in English) and Mese (or Month in English). Thanks&lt;/P&gt;&lt;P&gt;&lt;A href="http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/674/5430.Pivot.JPG"&gt;&lt;IMG alt="" border="0" src="http://community.qlik.com/resized-image.ashx/__size/550x0/__key/CommunityServer.Discussions.Components.Files/674/5430.Pivot.JPG" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;P.S.: no data are showed for the selections.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2011 12:10:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-data-grouping-for-particular-value-of-a-dimension/m-p/319673#M1198861</guid>
      <dc:creator />
      <dc:date>2011-04-11T12:10:05Z</dc:date>
    </item>
    <item>
      <title>Loading data grouping for particular value of a dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-data-grouping-for-particular-value-of-a-dimension/m-p/319674#M1198862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You should still be able to drag dimensions even with nine dimensions. Sometimes though it is neccesary to change the order of dimensions by using the Promote and Demote buttons on the Expressions tab of the chart's properties to get things in the right order.&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2011 15:10:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-data-grouping-for-particular-value-of-a-dimension/m-p/319674#M1198862</guid>
      <dc:creator>stevedark</dc:creator>
      <dc:date>2011-04-11T15:10:09Z</dc:date>
    </item>
    <item>
      <title>Loading data grouping for particular value of a dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-data-grouping-for-particular-value-of-a-dimension/m-p/319675#M1198863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm not able to move Importo Contratto dimension in the right position also even playing with the order in the Dimensions tab.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Apr 2011 15:31:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-data-grouping-for-particular-value-of-a-dimension/m-p/319675#M1198863</guid>
      <dc:creator />
      <dc:date>2011-04-11T15:31:12Z</dc:date>
    </item>
    <item>
      <title>Loading data grouping for particular value of a dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-data-grouping-for-particular-value-of-a-dimension/m-p/319676#M1198864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;If you are wanting this value to appear along side the other expressions then you need to make it an expression also (rather than a dimension). It is always safest to put an aggregation around values in expressions. If SUM gives you the wrong answer (due to double counting) then you could try a max (ie. max(ImpContratto) ).&lt;/P&gt;&lt;P&gt;Another observation, looking at your data model you have done a number of resident loads to get unique lists of your key fields in separate tables. You do not need to do this - QlikView will effectively create unique lists in memory anyway. Those resident loads will only slow your load script and cause performance issues in the front end.&lt;/P&gt;&lt;P&gt;Good luck with getting it all how you want.&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Apr 2011 22:21:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-data-grouping-for-particular-value-of-a-dimension/m-p/319676#M1198864</guid>
      <dc:creator>stevedark</dc:creator>
      <dc:date>2011-04-12T22:21:57Z</dc:date>
    </item>
    <item>
      <title>Loading data grouping for particular value of a dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-data-grouping-for-particular-value-of-a-dimension/m-p/319677#M1198865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;ImpContratto is unique for CodiceCommessa value, but the key of original table is composed of CodiceCommessa, Anno (or Year) and Mese (or Month). So, ImpContratto should be duplicated. Why does it move this amount in the expressions? Is it not possible to manage it as a dimension? The issue is a little different. If I should have another dimension instead of ImpContratto the problem remains.&lt;/P&gt;&lt;P&gt;The resident loads that you say are made to create the dimensions. The keys is CodiceCommessa + Anno + Mese and so there aren't distinct values for Anno or Mese in the main load.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2011 12:21:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-data-grouping-for-particular-value-of-a-dimension/m-p/319677#M1198865</guid>
      <dc:creator />
      <dc:date>2011-04-14T12:21:27Z</dc:date>
    </item>
    <item>
      <title>Loading data grouping for particular value of a dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-data-grouping-for-particular-value-of-a-dimension/m-p/319678#M1198866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;QlikView keeps expressions and dimensions separate in Pivot tables. If you want that value to appear with the expressions you need to also make it an expression - and resolve the duplicate value issues with a max statement. If you have another text dimension then it won't belong with the expression values and should sit fine with the other dimensions.&lt;/P&gt;&lt;P&gt;You do not need to have tables with distinct values in to use them as dimensions. QlikView automatically shows only distinct values. If you remove the resident loads where you are simply loading a single field with a group by statement you should see no change in functionality.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2011 20:17:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-data-grouping-for-particular-value-of-a-dimension/m-p/319678#M1198866</guid>
      <dc:creator>stevedark</dc:creator>
      <dc:date>2011-04-14T20:17:58Z</dc:date>
    </item>
  </channel>
</rss>

