Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
In a google spreadsheet, I have 2 columns of data. I'd like to merge them into another column. The data on column 1 is not as the same as column 2 (data that is present in column 1 but not in column 2). I would like to merge them to create a single column of information containing no multiple data, complete list of column 1 and 2 to column 3.
Expected Result:
Column 1
Apple
Banana
Cashew
Watermelon
Column 2
Apple
Banana
Strawberry
Mango
Column 3
Apple
Banana
Cashew
Watermelon
Strawberry
Mango
List of fruits in column 1 and 2 are not exactly the same and it is all listed in column 3 without duplicate fruit name result.
does this formula work as you want in column C:
=UNIQUE({A:A;B:B})
You can use cell function - CONCATENATE.
e.g. cell A1 contains data "Name", cell B1 contains data "Suffix" then in C1 you can use functions as =CONCATENATE(A1,B1) this will give NAMESuffix in cell C1.
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
So, if you can imagine a person was simultaneously enrolled in 100 different courses and had just received final grades for all courses, would it be better practice to store that information like so (wide columns):
personID
Math
Science
English
1
90
88
98
2
91
98
90
(and ...97 other columns)
Or like this:
personID
Grade
Subject
1
90
Math
1
88
Science
1
98
English
This brings the columns down significantly (from 100 to 3).
creating 100+ columns on any table is always bad idea. there is limit on no of columns in any database.
read this to get better idea. as you can think of following way.
StudentsMarkDetails
StudentsMarkDetailsID
personID
SubjectId
MarksObtained
ExamID
1
1
3
64
1
2
2
4
36
1
3
1
4
36
2
SubjectMaster
SubjectId
SubjectName
1
Maths
2
Science
3
English
Definitely option two - few fixed number of columns.
The reasons are many. Here’s a few:
maintenance: if you have 100 columns now, tomorrow you’ll have 101. Adding a column requires a schema change, which is painful
access: to get a value, you need to code the column name. This a form of maintenance problem in the code that accesses it, be it queries or app code
queries: basic queries become impossible. Write the query that returns the average grade for a student and the problem will be immediately obvious
Here are two solid rules I made for myself that I never break:
Prefer more rows over more columns.
Prefer more columns over more tables.
It is better to store the data with one row per person and per course. Why? Here are some reasons:
Different people may have different courses.
Most databases have a limit on the number of columns in a table.
You may want to store additional information per score, such as the date/time it was entered.
It is easy to add new courses or to change existing scores, if necessary.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
Most examples of rowspanning I have seen involve hard-coded values.
How would I create row-spans dynamically based on the column values? Specifically, I'd like to dynamically merge all adjacent identical rows into one cell, to get a result such as this:
Ag-Grid - Only Date rows are to be span
Can the function logic to define a row-span access the values from other rows? Can it do so relative to itself (e.g. next row, prev row)?
While defining your column definitions, you can specify the row span of each column.
For example this will specify 5 rows merged
colDef = {
headerName: "Country",
field: "country",
rowSpan: 5
}
Also you can have it as a function to be more dynamic
colDef = {
headerName: "Country",
field: "country",
rowSpan: function(params) {
return params.data.country==='Russia' ? 2 : 1;
}
}
This will specify 2 merged rows if the country is Russia and 1 for everything else. This is taken from AG-Grid documentation here.
I suggest reading more on the row span in the documentation. It explains it well.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I want to get a crosstable operation by using Talend Open studio.
My Source is like:
id 201601 201602 201603 ...
1 aa bb cc ...
I want to get the output like below:
id date value
1 201601 aa
1 201602 bb
1 201603 cc
. . .
. . .
. . .
Column name is depend on date. So I need a automatic way to convert columns into rows.
You may use tSplitRow.
See the capture with the job, tSplitRow configura and schema.
I think you can try with tUnpivotRow component. However you need to know this is custom component created by community member daztop.
Component is avalaible to download from this link.
Under this link you will find instruction how to use this component.
Also if your data are stored in database you can transpose columns to rows direclty in that database by running proper sql query via talend (query depends from databse engine).
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I have two datasets which looks like:
# 2013_data.tsv
year state age
2013 CA 22,5
2013 OH 19,3
2013 IL 45,5
2013 TX 33
# 2012_data.tsv
year state age
2012 CA 23
2012 OH 21,5
2012 CA 44,3
2012 TX 34,4
I want to use year as a pager on the Tableau map.
How can I join this separate data sources?
You could blend on year, but if the year is always different in each data source then the blend will not match on anything and you will get no results.
I am guessing that each data source (tsv file) has the same format (same number of columns and column names). In that case you can extract each data source with tableau desktop and then add the data from each source to get a master extract. (you are basically appending the data extracts):
and you will get all the data in one extract:
from here it is simple to combine the years in one visualization.
Also, since this is SO, I will point out that you can do this programatically with the extract API (see https://www.tableau.com/learn/tutorials/on-demand/extract-api-introduction).
Your best approach in this case is to put all the data into one table before using tableau. (It looks like what you really want is a union instead of a join)
Another approach is to put two tables in the same database, or two tabs on the same spreadsheet,and use custom SQL to union all them together. Or you can append multiple tables into a single Tableau extract as emh described.
If you are conceptually joining tables instead of unioning them, you could also use data blending.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
In my SQLite database (FMDB) i have some attributes as listed below;
Module | Student1 | Student2 | Student3 | Student4 | Student5
One Module may have a minimum of 2 students and a maximum of 5 students. So based on the number of students i have to display Buttons.
If the number of student are 3, then i should display 3 buttons. For Ex : if the database entry is as
Science | jack | Tom | - | Debra | -
note that the - sign is an empty record. So if we come across a entry with - sign we have to ignore it. So according to the above query we have 3 students and we should display 3 buttons. (If there were 4 students we should display 4 buttons and etc...)
How could i read the values from the database, and base on that answer add buttons to the UI ?
note: I don't have any proper code to demonstrate my working. I am lost in this.
Ok, So first learn about interacting with with a SQLite FMDB Here
Then, create some kind of for loop combining the code from here and here to create UIButtons and add them to an array, then displaying only the UIButtons in the array.
The positioning of the buttons onscreen is just a bit of simple math.