Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

thnkgreen
Contributor

Grouping Dimensions in a Table

Hello my QlikView friends   I am hoping this is very easy to understand and create.  I have an example table pictured below.  I want to know how to create the grouped dimension section, with the arrow pointing to it.  It is my current understanding that I would have Expressions for Apples and Oranges, summing each.  But how do I group those two fields under another calculated dimension?  Thank you

Captured.PNG.png

4 Replies
eduardo_sommer
Valued Contributor

Re: Grouping Dimensions in a Table

Create a table, like

Load * inline [

Category, Item

Fruits, Apples

Fruits, Oranges

Vegetables, Tomato

Vegetables, Potato

];

No, you can use the Category as a dimension and pivot it to columns

Eduardo

eduardo_sommer
Valued Contributor

Re: Grouping Dimensions in a Table

I forgot something: you can also pivot the Item Dimension to a column, under category, and have what you want.

Eduardo

Re: Grouping Dimensions in a Table

Simple add one calculated dimension

=If(Match(FruitType,'Apples','Oranges'),'Fruit',

  if(Match(FruitType,'Tomoto','Potato'),'Vegetables'))

Note:- I assume FruitType contains(Apples,Oranges,Tomoto,Potato)

marcioarruda
Contributor III

Re: Grouping Dimensions in a Table

In a PivotTable upload your data.

exemplo1.JPG

Click Category, and then drag until the blue arrow on the column expression

exemplo2.jpg

will look like

exemplo3.JPG

Click on item and drag down Category until the blue arrow as shown below

exemplo4.jpg

will look like

exemplo5.JPG