Confiforms - How to get a pivot table around a state field
Asked by Sopaboba:

Hi experts

I have a Confiforms with the next structure (simplified, but those are the important field in this case):

|-------------|-----------|
| **RECORD**  | **STATE** |
| A/0001/2021 | CURRENT   |
| A/0001/2021 | MOVED     |
| A/0001/2021 | SUCCESS   |
| A/0001/2021 | SUCCESS   |
| A/0001/2021 | MOVED     |
| A/0002/2021 | CURRENT   |
| A/0002/2021 | CURRENT   |
| A/0002/2021 | CURRENT   |
| A/0002/2021 | MOVED     |
| A/0002/2021 | SUCCESS   |

I know easily how to get, with a TableView Merger, the next result, to show information to the different users about the states of their tasks:

|-------------|-----------|-----------|
| **RECORD**  | **STATE** | **COUNT** |
| A/0001/2021 | CURRENT   | 1         |
| A/0001/2021 | MOVED     | 2         |
| A/0001/2021 | SUCCESS   | 2         |
| A/0002/2021 | CURRENT   | 3         |
| A/0002/2021 | MOVED     | 1         |
| A/0002/2021 | SUCCESS   | 1         |

But, what I really want to get is an output similiar to the next, simulating a pivot table around the fields Record and State:

|-------------|-------------|-----------|-------------|
| **RECORD**  | **CURRENT** | **MOVED** | **SUCCESS** |
| A/0001/2021 | 1           | 2         | 2           |
| A/0002/2021 | 3           | 1         | 1           |
| A/0003/2021 | 0           | 4         | 1           |
| A/0004/2021 | 1           | 3         | 6           |
| A/0005/2021 | 6           | 2         | 1           |
| A/0006/2021 | 2           | 0         | 0           |
| A/0007/2021 | 3           | 1         | 4           |
| A/0008/2021 | 0           | 0         | 4           |
| A/0009/2021 | 0           | 1         | 2           |
| A/0010/2021 | 1           | 5         | 2           |

Is that possible with Confiforms? Only Confiforms app, I can't use other kind of add-ons.

Thanks in advance.


Answers:
author: Sopaboba
body: I am going to answer myself.

I solved it this way:

In a TableView Merger, you introduce the following fields:

Field: Record

Field: CURRENT:(\[count_status.label=CURRENT\]), where CURRENT is the label set to the value current in a state field

Field: MOVED:(\[count_status.label=MOVED\]), where MOVED is the label set to the value moved in a state field

Field: SUCESS:(\[count_status.label=SUCCESS\]), where SUCCESS is the label set to the value success in a state field

and so on. And I get the wished result.

Then you can apply CSS to highlight the cells as you want and that's it.


author: Katerina Kovriga {Stiltsoft}
body: Hi [@Sopaboba](/t5/user/viewprofilepage/user-id/4075877) ,

I've got that you want to use only ConfiForms app for the issue and we'll wait for the representatives of their team to post an answer, but in case other Community members will come across this question - it's a common situation that they have two apps: ConfiForms and our [Table Filter and Charts for Confluence](https://marketplace.atlassian.com/apps/27447/table-filter-and-charts-for-confluence?hosting=server&tab=overview) app.

The latter [supports the ConfiForms tables](https://docs.stiltsoft.com/display/public/TFAC/How+to+use+the+app+with+ConfiForms) and works with them as with regular Confluence tables.

So, to achieve your goal, you may use our [Pivot Table](https://docs.stiltsoft.com/display/public/TFAC/How+to+use+Pivot+Table+macro) macro:

![Mon 7-2.png](https://community.atlassian.com/t5/image/serverpage/image-id/167425i3D89E4B0AFDD53A1/image-size/large?v=v2&px=999 "Mon 7-2.png")

![Mon 7-1.png](https://community.atlassian.com/t5/image/serverpage/image-id/167426i45222E4C45DCCEA6/image-size/large?v=v2&px=999 "Mon 7-1.png")

Here you may also choose to show/hide the totals.

comments: author: Sopaboba
body: Hi Katerina

Thank you for your answer, but that is not what I am looking for. As I wrote in my question, I can only do it with Confiforms. No other adds are allowed ... unless they're free.

:)


Tags: confiforms