# QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

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

4 Replies
Valued Contributor

## Re: Grouping Dimensions in a Table

Create a table, like

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

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

MVP

## Re: Grouping Dimensions in a Table

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

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

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

Contributor III