How to add data to the grouped row in AgGrid's grid - ag-grid

When using Row Grouping in AgGrid, how one can add data to the grouped row as follows:
The result is not an aggregate, actually it should be another value from the group itself, I can use the master detail to achieve that but I couldn't find an easy way of changing the details grid to look like the grouped one.

Related

ag-grid prevent expanding grouped data

I am using ag grid enterprise with grouping.
Is it possible to group data but based on first column but prevent expanding the row? I just want to display the sums.
I am using this data : https://raw.githubusercontent.com/ag-grid/ag-grid/master/grid-packages/ag-grid-docs/src/sample-data/rowData.json
Please check the code here: https://codesandbox.io/s/nice-varahamihira-1r8bf?file=/src/App.js
As you can see in the image, I just want to display the total sum of prices of Toyota, Ford etc, but I do not want the users to expand them.
If you do not need the children, why you need a tree view for it?
You should do this logic in component and only pass the sums data to the grid.

Tableau - add row without making it a subset of previous row

I want to add rows to a Tableau text table without making the row a subset of the previous row. Using the example below, I want values for teams and status to display on separate rows rather than status appearing as a subset of team. I also want to add a team filter so that if I filter on team blue, values for green row are zero and status values update . Is this possible? I tried creating separate worksheets but keeping things aligned is problematic.
Example Data:
Desired text table:
What I don't want:
Select both the fields(team, status) simultaneously then right click and go to Transform > Pivot.
Then 2 Dimensions will be created. Drag the Pivot Field Values on to Rows section
and Year on to Columns section and keep Year in Discrete format.
Then drag Number of Records on to value field section.
Before Pivot:
After Pivot and final viz:

Group by first two characters of column, in Tableau?

I'm using Tableau Desktop v9.0. I have data that looks like this:
code,items
02050252,7
03040620,19
03060423,3
I want to create a bar chart of the items grouped by the first two characters of the code field.
So effectively a chart that shows this underlying data:
new_code,items
02,7
03,22
Is it possible to do this within Tableau? Or do I need to group the data manually myself first?
You can definitely do this within Tableau.
Make sure that your code column is a string. If it's not, right click on it in the dimensions section and choose Change Data Type.
Then, create a calculated field (Analysis -> Create Calculated Field) and enter the expression LEFT([Code], 2), which will take the first two characters of the code field.
Drag your new_code field to the Rows shelf and Items to the Columns shelf and voila, you have your desired data. You can of course change the type of the chart, make it a table, etc. from here.

How to list multiple rows within Table component specific column?

I have Table and I want to display multiple row in same band like the below image
I have tried with by Adding frame inside the table column and using list component to list multiple rows but it wont works.
like the following hierarchy
Table-->Detail band-->Column-->Frame-->list component-->TextField
Can any one help me How to Solve this ? thanks in advance
There are two ways of doing it.
Way 1:
Put a sub report into last column. Pass the data to it. This way there would be multiple fields in it.
Way 2:
Use groups and custom styles along with groups(styles and groups will have to manages logically).
I think you should go for way 1 if the data in your last column does not span more than one page. Otherwise way 2 is applicable.

Is it possible to create a row that spans all columns of a Matrix in SSRS 2008?

Is it possible to have add a row to an SSRS 2008 Matrix that spans all of the matrix's columns?
This crude diagram shows roughly what I'm looking for:
The basic idea is that each line item is a person, and each column is a field in a form for that person. The fields themselves are dynamic (and implemented as column groups on the matrix). Additional column groups are included to append non-dynamic form fields, like the time the record was entered and who entered it. Under each person's record is a comments field, which should span all of the form fields above it.
At the moment I have the matrix embedded in another tablix, with the name and fields in the matrix and the comments in the parent tablix. This works for the data (each instance of the matrix ends up being one row), but the header repeats too often (once per person) because it's attached to the matrix. The only thought I have as to how to fix this is to create another matrix in the parent tablix with the same grouping and use it to display the headers... But this will require quite a lot of manual synchronization to keep the two matrices the same.
Edit: The key problem here is making the second row span multiple column groups.
Here's what you can do:
Select the column grouping you want to add above and right click and select
Add Group... Parent Group...
Group the column by something that will not aggregate the data. You'll have to select a field from your dataset to group by so that it creates an overlapping column grouping.
Check the Add group header box
You should now see something similar to this:
Now you just need to move the Value1 field and it's header over under the new column to the right beyond the matrix dividers. Once that's done, simply delete the ungrouped column where you just copied Value1 from and be sure to select Delete columns only checkbox.
Your finished product should look like this:
It is possible - And the above answers are partial answers leaving out one key step: Merging the cells of the child row.
First, right click on your grouped row, then select Insert Row -> Inside Group - Below and you will get two rows with the cells aligning on the columns
Second, ctrl click all the cells in your new row (ie row without the data) then right click on one of the highlighted cells, and then select Merge Cells.
Now you have the table you like. To add a value to the new row: first right click your new (multi column) cell,select Create Placeholder, and then add the dataset item you desire to the placeholder.
[Edit]
After several attempts, I'm going to say this isn't possible in SSRS. The best I could come up with is a group footer that spans columns 1,2, and 3, but not the User column.
[Original Response]
I recently did something similar to this.
First, what tool are you using to create SSRS reports? (I used SQL Server Business Intelligence Development Studio)
You'll want to create a row group (grouped on Person)
Append a row to your table in "Design" view (Right click, "Insert Row --> Inside Group - Below").
Add an expression to the row that pulls the value for your "Comment" column (=Fields!Comment.Value).
Let me know if that helps...
Try adding in you column group "header" with a grouping expression of (1=1). Then a detail field will need to be defined. If you define the other group with correct data then the "header" will stretch across all details columns. You may need to merger depending on other options.
The easiest way to do this is to create a Tablix with only one column, and your row grouping.
Then, you create two rows inside this group.
In the first row inside the group, you insert a Matrix, wich you can then subgroup as you prefer.
I just had a similar problem, and this was my solution.
I banged my head against the wall for a lot of time, until i realized the solution to my problem wasn't "making a cell span multiple column groups", but "making a cell split into multiple column groups".
You can accomplish the goal by using a subreport for each person. The subreport will receive the employee id and create the hierarchy for you. Make sure your subreport column widths match the widths of the parent report.