Group By View Table

darkbcx

New Member
Hello, I'm new in using Fabrik 3.x. I've got a question :

I have a table with following data

*-------*--------*
| Class | Name |
*-------*--------*
| A | John |
| A | Andy |
| B | Mark |
| B | Mathew |
| B | Luke |
*-------*--------*


Is there any method that I can use to produce a view that looks like this :

*-------*-------*
| Class | Count |
*-------*-------*
| A | 2 |
| B | 3 |
*-------*-------*

Sorry for my English
 
Hi,

You can do something similar using the calculation option on your "Name" element. Choose the 'count' option over your element. Then you can modify the table (list) view using the "Group By" option, and group your list by your "Class" element.

This will produce a list view grouped by class, and above each group will appear the count value corresponding to each Name in this Class. If you don't want to see the "Name" element, you should check the "No show in list" option.

Is it something like that you need?

Another solution, if you want exactly the same thing as you second view, is to use a custom PHP
script to make the job.
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top