<?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 Field Groups and Hierarchies in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Field-Groups-and-Hierarchies/m-p/176692#M504743</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vince,&lt;/P&gt;&lt;P&gt;I've used the following code to transform the data:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;LOAD&lt;BR /&gt; Date,&lt;BR /&gt; Customer,&lt;BR /&gt; Product,&lt;BR /&gt; pick(iterno(), 'Sales', 'Rebates', 'COGS', 'Marketing', 'Travel') as Measure,&lt;BR /&gt; pick(iterno(), Sales, Rebates, COGS, Marketing, Travel) as Value&lt;BR /&gt;RESIDENT SalesData&lt;BR /&gt;WHILE iterno() &amp;lt;= 5;&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;This code loops 5 times over each row in the original data (once for each of Sales, Rebates, COGS, Marketing, Travel), and for each loop loads one of the values 'Sales', 'Rebates', etc. as Measure and the matching field value as Value.&lt;BR /&gt;(The iterno() function returns 1 for the first loop over a row, 2 for the second loop, etc.; it starts back at 1 for the first loop over the next row, etc. The pick() function looks at it's first parameter, and returns the first of the other parameters ('Sales') if it's 1, the second ('Rebates') if it's 2, etc.).&lt;/P&gt;&lt;P&gt;With regards,&lt;/P&gt;&lt;P&gt;Martijn&lt;/P&gt;&lt;P&gt;PS: It's a QV9 file; are you using 9 or 8.5 to open it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Sep 2009 15:32:31 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-09-14T15:32:31Z</dc:date>
    <item>
      <title>Field Groups and Hierarchies</title>
      <link>https://community.qlik.com/t5/QlikView/Field-Groups-and-Hierarchies/m-p/176683#M504734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am a new user using the Personal Edition of QV. I need help in creating an account hierarchy similar to those in OLAP tools such as Essbase or Analysis Services.&lt;/P&gt;&lt;P&gt;My data file has account information in multiple Fields (columns). I want to group these by P&amp;amp;L categories such as GrossProfit, Sales and SGA for example. My goal is to start at the highest level such as NetIncome and drill down through the Account Groups and Accounts that make up the hierarchy.&lt;/P&gt;&lt;P&gt;Any help would be appreciated, especially detailed step-by-step instructions to help out a novice! [:)]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Sep 2009 22:50:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Field-Groups-and-Hierarchies/m-p/176683#M504734</guid>
      <dc:creator />
      <dc:date>2009-09-04T22:50:49Z</dc:date>
    </item>
    <item>
      <title>Field Groups and Hierarchies</title>
      <link>https://community.qlik.com/t5/QlikView/Field-Groups-and-Hierarchies/m-p/176684#M504735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are several ways to handle hierarchical information. You can do a hiearchy load, but I haven't actually had a use for it yet, only played with it to understand it. What I much more typically do is create cyclic or drill down groups, and leave my data completely unhierarchical.&lt;/P&gt;&lt;P&gt;For example, I might have a table like this:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;Group Division Department Account Value&lt;BR /&gt;Operations Rolling Roll Maint 12345 50000&lt;BR /&gt;Operations Rolling Machine 1 12367 40000&lt;BR /&gt;...&lt;/P&gt;&lt;P&gt;Even if Group, Division, Department and Account are a hierarchy, I'm likely to just read the table in flat like that.&lt;/P&gt;&lt;P&gt;But I might want a bar chart where I can drill down through the hierarchy. So then I would define a drill down group made of of Group, Division, Department and Account. I would use that group as the dimension on a chart. I'd use sum(Value) as the expression for the chart. The chart would then start off displaying the total by Division for the Group. If I click on a Division, it would show me the total by Department for that Division. And so on.&lt;/P&gt;&lt;P&gt;Or I could create a pivot table and put the four fields in as dimensions, sum(Value) is as an expresison, and ask for subtotals. I could then navigate through the hierarchy by expanding and collapsing nodes in my pivot table.&lt;/P&gt;&lt;P&gt;So in general, my approach to hierarchies isn't to build them into the data model, but simply to define them on the fly in the charts as I need them. In general, I feel that's a more flexible approach, particularly when the hierarchies aren't rigid, and are just how the users want to see it right now.&lt;/P&gt;&lt;P&gt;See attached example for how you could acutally implement everything I was saying above.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 05 Sep 2009 04:41:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Field-Groups-and-Hierarchies/m-p/176684#M504735</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2009-09-05T04:41:03Z</dc:date>
    </item>
    <item>
      <title>Field Groups and Hierarchies</title>
      <link>https://community.qlik.com/t5/QlikView/Field-Groups-and-Hierarchies/m-p/176685#M504736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vince,&lt;/P&gt;&lt;P&gt;As John already mentions: you could leave the different levels in your data as separate columns, and make a drill-down group in your user interface to use as a dimension in charts/graphs.&lt;/P&gt;&lt;P&gt;This assumes a balanced hierarchy: each path from the highest level (NetIncome) to the lowest level (Accounts) has the same number of steps. If you're using an unbalanced hierarchy (e.g. containing paths like 'Board of Trustees' -&amp;gt; 'Department of Education' -&amp;gt; 'DoE Staff' (3 steps) in one case, and 'Board of Trustees' -&amp;gt; 'Department of Computer Science' -&amp;gt; 'San Diego campus' -&amp;gt; 'DCS San Diego staff' (4 steps) in another case), QlikView has the 'hierarchy' and 'hierarchybelongsto' prefixes to the LOAD statement to transform your data.&lt;/P&gt;&lt;P&gt;Read pages 303 / 304 of the 'QlikView Reference Manual.pdf' in the QlikView installation directory (this is MUCH clearer than the QlikView help file) for an explanation.&lt;/P&gt;&lt;P&gt;Sorry that I can't offer a step-by-step, guess this depends too much on what you're trying to achieve.&lt;/P&gt;&lt;P&gt;With regards,&lt;BR /&gt;Martijn ter Schegget&lt;BR /&gt;CND Development&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Sep 2009 17:49:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Field-Groups-and-Hierarchies/m-p/176685#M504736</guid>
      <dc:creator />
      <dc:date>2009-09-07T17:49:22Z</dc:date>
    </item>
    <item>
      <title>Field Groups and Hierarchies</title>
      <link>https://community.qlik.com/t5/QlikView/Field-Groups-and-Hierarchies/m-p/176686#M504737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;just one question when reading your post ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive_text_macro jive_macro_quote" jivemacro="quote"&gt;&lt;BR /&gt;John Witherspoon wrote:&lt;BR /&gt;See attached example for how you could acutally implement everything I was saying above. &amp;lt;div&amp;gt;&amp;lt;/div&amp;gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;A user using the "personal edition" is not able to open your example, isn't it?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Best regards&lt;BR /&gt;Stefan WALTHER&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Sep 2009 19:08:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Field-Groups-and-Hierarchies/m-p/176686#M504737</guid>
      <dc:creator />
      <dc:date>2009-09-07T19:08:31Z</dc:date>
    </item>
    <item>
      <title>Field Groups and Hierarchies</title>
      <link>https://community.qlik.com/t5/QlikView/Field-Groups-and-Hierarchies/m-p/176687#M504738</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not really up to date on what Personal Edition can and can't open. If it can't open example files from other people, that sounds like a problem. Or maybe the problem is on my end - I'm mostly using 8.5, but I do have 9.0 personal edition on my machine so that I can get some experience with it before we upgrade officially. Maybe I saved it under personal edition, and therefore others can't open it? I'm saving in 8.5 and reposting just in case that fixes it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Sep 2009 23:55:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Field-Groups-and-Hierarchies/m-p/176687#M504738</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2009-09-08T23:55:25Z</dc:date>
    </item>
    <item>
      <title>Field Groups and Hierarchies</title>
      <link>https://community.qlik.com/t5/QlikView/Field-Groups-and-Hierarchies/m-p/176688#M504739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the posts but I can not open your files with my personal edition. I understand Groups as they pertain to dimensions in your first example. However, my data is not structured that way. Instead, I want to group Expressions together. Here is a simplified example of the file layout:&lt;/P&gt;&lt;P&gt;Date Customer Product Sales Rebates COGS Marketing Travel&lt;/P&gt;&lt;P&gt;2008.FEB WalMart Towels 12000 -200 -8000 -400 -100&lt;/P&gt;&lt;P&gt;2008.FEB WalMart Tires 19000 -500 -13000 -900 -500&lt;/P&gt;&lt;P&gt;I want to group similar accounts (they appear in the Expressions tab when I create charts) together such as Sales and Rebates grouped as NetSales, Marketing and Travel together as SG&amp;amp;A, NetSales and COGS as GrossProfit and GrossProfit and SG&amp;amp;A as NetIncome. . As this file shows, the group parent accounts do not exist. Having created groups, I wanted to then drill down into them starting at NetIncome all the way down to the the lowest account level details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any further advice is appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Sep 2009 20:05:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Field-Groups-and-Hierarchies/m-p/176688#M504739</guid>
      <dc:creator />
      <dc:date>2009-09-09T20:05:42Z</dc:date>
    </item>
    <item>
      <title>Field Groups and Hierarchies</title>
      <link>https://community.qlik.com/t5/QlikView/Field-Groups-and-Hierarchies/m-p/176689#M504740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;Personal Edition files can't be opened with other people's Personal Edition QVs. Luckily, a Partner License version can open pretty much anything &lt;IMG alt="Stick out tongue" src="http://community.qlik.com/emoticons/emotion-4.gif" /&gt;.&lt;/P&gt;&lt;P&gt;I took the liberty to copy the scripts and objects from your version into a new one; anyone should be able to open this one.&lt;/P&gt;&lt;P&gt;With regards,&lt;BR /&gt;Martijn&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2009 15:03:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Field-Groups-and-Hierarchies/m-p/176689#M504740</guid>
      <dc:creator />
      <dc:date>2009-09-10T15:03:13Z</dc:date>
    </item>
    <item>
      <title>Field Groups and Hierarchies</title>
      <link>https://community.qlik.com/t5/QlikView/Field-Groups-and-Hierarchies/m-p/176690#M504741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vince,&lt;/P&gt;&lt;P&gt;I've played around with the example data in your last post (assuming the two rows you posted are your source data, and not the requested output format); see the attached QVW for the result. The issue is in trying to roll up the expressions (instead of dimensions); I've solved this by 'flattening' the data into a format with one row for each measure, with two columns: one showing which measure this is (Sales, Rebates, etc.) and the other showing the value. I've then built a hierarchy on the measures, and used this as a set of dimensions to group by in pivot tables.&lt;/P&gt;&lt;P&gt;By the way: this &lt;B&gt;only&lt;/B&gt; works (i.e. is conceptually correct) if your measures are in the &lt;I&gt;same unit&lt;/I&gt; (in this case some currency) and &lt;I&gt;can be added&lt;/I&gt; together!&lt;/P&gt;&lt;P&gt;Hope this solves your problem.&lt;/P&gt;&lt;P&gt;With regards,&lt;BR /&gt;Martijn ter Schegget&lt;/P&gt;&lt;P&gt;PS: the data used when rolling up the expressions is remodelled to something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;2008.FEB, WalMart, Tires, Sales, 19000&lt;BR /&gt;2008.FEB, WalMart, Tires, Rebates, -500&lt;BR /&gt;etc.&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2009 16:22:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Field-Groups-and-Hierarchies/m-p/176690#M504741</guid>
      <dc:creator />
      <dc:date>2009-09-10T16:22:54Z</dc:date>
    </item>
    <item>
      <title>Field Groups and Hierarchies</title>
      <link>https://community.qlik.com/t5/QlikView/Field-Groups-and-Hierarchies/m-p/176691#M504742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Martijn,&lt;/P&gt;&lt;P&gt;You understood my request perfectly. Unfortunately, I can not open your QVW.&lt;/P&gt;&lt;P&gt;My question then is did you transform the data within QlikView or did you transform it prior to loading into QlikView?&lt;/P&gt;&lt;P&gt;Thanks for the prompt and thorough responses.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Sep 2009 03:00:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Field-Groups-and-Hierarchies/m-p/176691#M504742</guid>
      <dc:creator />
      <dc:date>2009-09-12T03:00:30Z</dc:date>
    </item>
    <item>
      <title>Field Groups and Hierarchies</title>
      <link>https://community.qlik.com/t5/QlikView/Field-Groups-and-Hierarchies/m-p/176692#M504743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vince,&lt;/P&gt;&lt;P&gt;I've used the following code to transform the data:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;LOAD&lt;BR /&gt; Date,&lt;BR /&gt; Customer,&lt;BR /&gt; Product,&lt;BR /&gt; pick(iterno(), 'Sales', 'Rebates', 'COGS', 'Marketing', 'Travel') as Measure,&lt;BR /&gt; pick(iterno(), Sales, Rebates, COGS, Marketing, Travel) as Value&lt;BR /&gt;RESIDENT SalesData&lt;BR /&gt;WHILE iterno() &amp;lt;= 5;&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;This code loops 5 times over each row in the original data (once for each of Sales, Rebates, COGS, Marketing, Travel), and for each loop loads one of the values 'Sales', 'Rebates', etc. as Measure and the matching field value as Value.&lt;BR /&gt;(The iterno() function returns 1 for the first loop over a row, 2 for the second loop, etc.; it starts back at 1 for the first loop over the next row, etc. The pick() function looks at it's first parameter, and returns the first of the other parameters ('Sales') if it's 1, the second ('Rebates') if it's 2, etc.).&lt;/P&gt;&lt;P&gt;With regards,&lt;/P&gt;&lt;P&gt;Martijn&lt;/P&gt;&lt;P&gt;PS: It's a QV9 file; are you using 9 or 8.5 to open it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Sep 2009 15:32:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Field-Groups-and-Hierarchies/m-p/176692#M504743</guid>
      <dc:creator />
      <dc:date>2009-09-14T15:32:31Z</dc:date>
    </item>
  </channel>
</rss>

