Example structure for a vertical table
- Last UpdatedSep 06, 2023
- 1 minute read
This is an example of flat data before pivoting.
|
ID |
Sample Time |
Sample ID |
Field |
Value |
Imported |
|---|---|---|---|---|---|
|
1 |
2009-01-30 |
SM090130 |
Gold |
0.14 |
False |
|
2 |
2009-01-30 |
SM090130 |
Silver |
0.6 |
False |
|
3 |
2009-01-30 |
SM090130 |
Lead |
0.5 |
False |
|
4 |
2009-01-30 |
SM090130 |
Gold |
0.143 |
False |
|
5 |
2009-01-29 |
SM090129 |
Gold |
0.1 |
True |
|
6 |
2009-01-29 |
SM090129 |
Silver |
0.2 |
True |
|
7 |
2009-01-29 |
SM090129 |
Lead |
0.3 |
True |
Notes
-
A single row per piece of data
-
There may be multiple records for the same "piece" of data. This is usually due to different testing processes that increase in precision. For example, three values that increase in precision over time. More recent values are usually more accurate than the preceding one.
-
Gold (after 1 hour) = 0.1
-
Gold (after 12 hours) = 0.14
-
Gold (after 24 hours) = 0.1432
-
While there is a lot of information stored in such data, it can be difficult to get summarized information. A pivot table can help quickly summarize the flat data, giving it depth, and displaying information in a more useful way to interpret.
Example structure after pivoting
The following data (shown after pivoting) has occurred. The data is grouped around the fields: SampleTime and SampleID. The pivot column is Field and the pivoted value column is Value.
|
SampleTime |
Sample ID |
ID |
Imported |
Gold |
Silver |
Lead |
|---|---|---|---|---|---|---|
|
2009-01-29 |
SM090129 |
7 |
False |
0.1 |
0.2 |
0.3 |
|
2009-01-30 |
SM090130 |
4 |
True |
0.143 |
0.6 |
0.5 |