This is a migrated thread and some comments may be shown as answers.

Sum grouped by a value

1 Answer 548 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Luka
Top achievements
Rank 1
Luka asked on 08 Nov 2016, 08:38 AM

Hi, 

I have a table like this 

name             category     quantity

apple                 fruit            3

banana              fruit            4 

broccoli         vegetable       2

oats               cereals          40 

chicken            meat            9

spinaches     vegetable       9 

I want to have a total based on category, like this:

fruit              7

vegetables   11

cereals         40

meats            9

 

Now I'm doing it with IIF, but I have dozens of categories.

 

 

 

1 Answer, 1 is accepted

Sort by
0
Katia
Telerik team
answered on 08 Nov 2016, 10:25 AM
Hi Luka,

Aggregation of values by a category can be achieved with Table/CrossTab item where the data can be aggregated by adding data field as a row/column grouping expression.

To create row/column groups for the Table/CrossTab you can use Table/Crosstab WizardThe structure of the created CrossTab can be explored in Group Explorer in  mode where you can also add child/parent groups and modify the current structure if needed.


Regards,
Katia
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Luka
Top achievements
Rank 1
Answers by
Katia
Telerik team
Share this question
or