Grouping Rows ("conditional copy") from different tables in LibreOffice Calc - libreoffice

I want to group the students of some classes into different groups at school using LibreOffice Calc.
I already have tables for all classes, where I entered the group (1-3) of every student:
What I LibreOffice want to do now, is to copy all students of all classes, which are in group 1 (group 2, group 3, ...), into one new table (Group1). Then, I have one list with the students for every group.
In this example, it would be Name1 and Name6.
I searched the web for hours and played around a lot without success.
Any help is appreciated!!

Select the data cells A1:B8;
Menu Data -> Standard Filter...
In the standard filter window, set the filter properties as follows:
Field Name: Group; Condition: =, Value: 1 (or select from dropdown);
Click on Options
Select "Copy results to"; enter the target: $Group1.$A$1
Click OK

Related

Is it possible to create a calculation field between two datasets in Tableau

I have two datasets. One consists of shipments and the other for demands.
I would like to have the difference between the shipment quantity that is sent to particular countries and the demand for these particular counties. and then subtract the sum of the demands for particular countries.
The two datasets don't have a common key. So I am wondering if it is possible to do that via a calculation field.
Thank you
You said it yourself - if there is no common key, how would you tell it to join the tables together?
You could create a "key" by creating two tables and aggregate them to country-level and use the country as a key. An easy way to join the two datasets could be to:
1) Create a worksheet and aggregate 'Shipment quantity' to country level
2) Mark everything and copy paste (Ctrl + C, Ctrl + V)
3) Tableau will now insert the newly created dataset on a new worksheet.
4) Do step 1-3 again with 'Demand' instead
5) In Data-sources you can now link these two together with 'Country' as a key.

Group by options in a cross tab report

I have a cross tab report in Crystal 2008 (ver 12). First column has a name and second as a phone number.
If there are two individuals with the same name, the report seems to combine the two cells and only show the name once (its like two rows have been merged into one such as in Excel). Both numbers however are shown correctly in two separate rows.
How can I show the name twice and not have it merged or group together?
[]
Your Cross Tab works fine because it's the same name (and cross tab put's it in one group row/column). To separate it, you have to make your column/row by some id_column of that person, but display name instead of that id_column.
For example you put your field in row/columns (id of person, not name),
and then press Group Options and set the name to be displayed
And that should do it.
Hope it helps

Grouping formula to account for two fields

Working with vehicle asset management and I am selecting data based on two statements:
({EQ_MAIN.PROCST_PROC_STATUS} in ["A", "AS", "AT"] and
{EQ_MAIN.DEPT_DEPT_CODE} like "P*" and
{EQ_MAIN.ASSET_TYPE} <> "COMPONENT")
or
({EQ_MAIN.PROCST_PROC_STATUS} in ["TA"] and
{EQ_MAIN.DEPT_TEMP_LOANED_TO} like "P*" and
{EQ_MAIN.ASSET_TYPE} <> "COMPONENT")
Basically, if the Equipment is in status A, AS, or AT and belongs to the departments that start with P, I want it to show on the report. However, the second part of the selection statement accounts for equipment that is temporarily loaned to another department (status TA). The selection statements seem to be working fine.
I have this data grouped by {EQ_MAIN.DEPT_DEPT_CODE}. But I want it to to include any temporarily loaned out equipment under the department group, if the equipment is on temp loan to said department. For example, Car A belongs to department K1234, but is on loan to department P5678. I want Car A to show up under the group for P5678 along with all the other vehicles that belong to P5678. Essentially, whether a piece of eq belongs to a specific department or is simply on loan to said specific department, I want to see them under the same group in Crystal. Thoughts?
I do not believe that a grouping formula is the solution for this scenario. The challenge is based in the recordset. Since there is only one LOANED_TO record per DEPT_CODE, you can go about this a couple of ways.
If this is an option, modify your query or view so that you generate all LOANED_TO records for each DEPT_CODE. This could be achieved by placing a subquery in your FROM clause if using SQL. Then, join your parent table EQ_MAIN to the subquery on a non-unique, general key. Since there is no one-to-one relationship in this scenario, you should get all LOANED_TO records for each DEPT_CODE. This will, however, bloat your recordset and mar performance.
Then, group the report first on {DEPT_CODE} and second on {LOANED_TO}. Use a suppression formula on the second group to hide any {LOANED_TO} Departments that do not match the parent group {DEPT_CODE}.
The more "traditional" Crystal approach is to group on {DEPT_CODE}. Then, add a sub report to a group section. Using the same datasource, move the second chunk of selection criteria (following the OR clause) to the sub report record selection. This will return all {LOANED_TO} records. Add a sub report link between the group {DEPT_CODE} and the sub report {LOANED_TO} dept. This will filter results to just those {LOANED_TO} records related to the main group.

iReport multiple copies of same report with different label

I am using iReport 4.1.3. I have created invoice report and I want to have 3 copies of same invoice report. The first invoice should have label as "ORIGINAL", second should have "DUPLICATE" and the third should have label as "TRIPLICATE" on it.
Thank you.
If you would like to show all three copies every time you open the report, here is a creative if not elegant solution.
Add a cross join to the FROM clause of your query returning the three different copies. In MySQL it looks like this:
CROSS JOIN
(
Select 'ORIGINAL' as copy, 1 as sequence
UNION
SELECT 'DUPLICATE' as copy, 2 as sequence
UNION
SELECT 'TRIPLICATE' as copy, 3 as sequence
) x
Then add the "copy" field to your select statement. This will cause your query to return 3 records for each record it was previously returning. One record with "ORIGINAL" in the copy field, one with "DUPLICATE" and one with "TRIPLICATE". Add "sequence" to your ORDER BY clause.
Then in the report, group by the "copy" field. Force a new page for each group and you should be all set. Any variables you are totaling at the report level you will need to change to the group level ("copy" group). And if you have any controls in the Summary section, move them to the new group footer section. Also create a text field to display the "copy" field in the page or group header.
It's not necessarily pretty, but it should work.

Crystal Report Selection Question

If I had a single table of items ordered (let's call the table "items"), and there was a column within the table that tied the items in the same order together (order_id), how would I select all orders that contained a certain "key" item?
In other words, I want to select orders that contain the "key" item and I want to see all the items with in that order, not just the "key" item.
For example, I want to select all grocery orders (and all the items within) where the person at least ordered "apples".
You could probably (although I haven't tested it):
Add your table twice (so you will have two aliases pointing to the same table: table_1, table_2), joining on order_id
In your selection formula, use {table_1.key} = "apples"
Add a group on {table_1.order_id}
Use fields from table_2 for the detail section
Alternatively, add the table once, select on {table.key} = "apples" and group by {table.order_id}. Add a subreport in the group header linked by {table.order_id} to display the items. This will be slower, but it will definitely give you what you want.