Numbers multiple columns single graph
HI
I have to log a single item of data each week for ten years and produce a single line graph spanning the ten years. Simple.
it is going to get very unwieldy using a single column with over 500 rows.
is there a way I can enter the data into e.g. 10 columns, one of each year BUT, still produce a single line graph spanning the whole ten years. I do not want a multiple line graph with a libe for each year.
Many thanks
Stephen
Hello
You might build y-in-single-column table from y-in-multi-column table and create chart using it.
E.g.,
Chart_Data (excerpt)
A1 X
A2 =ROW()-1
A3 =ROW()-1
A4 =ROW()-1
A5 =ROW()-1
A6 =ROW()-1
A7 =ROW()-1
A8 =ROW()-1
A9 =ROW()-1
A10 =ROW()-1
A11 =ROW()-1
A12 =ROW()-1
B1 Y1-3
B2 =OFFSET(Data::$A$1,MOD(ROW()-2,ROWS(Data)-1)+1,QUOTIENT(ROW()-2,ROWS(Data)-1)+1)
B3 =OFFSET(Data::$A$1,MOD(ROW()-2,ROWS(Data)-1)+1,QUOTIENT(ROW()-2,ROWS(Data)-1)+1)
B4 =OFFSET(Data::$A$1,MOD(ROW()-2,ROWS(Data)-1)+1,QUOTIENT(ROW()-2,ROWS(Data)-1)+1)
B5 =OFFSET(Data::$A$1,MOD(ROW()-2,ROWS(Data)-1)+1,QUOTIENT(ROW()-2,ROWS(Data)-1)+1)
B6 =OFFSET(Data::$A$1,MOD(ROW()-2,ROWS(Data)-1)+1,QUOTIENT(ROW()-2,ROWS(Data)-1)+1)
B7 =OFFSET(Data::$A$1,MOD(ROW()-2,ROWS(Data)-1)+1,QUOTIENT(ROW()-2,ROWS(Data)-1)+1)
B8 =OFFSET(Data::$A$1,MOD(ROW()-2,ROWS(Data)-1)+1,QUOTIENT(ROW()-2,ROWS(Data)-1)+1)
B9 =OFFSET(Data::$A$1,MOD(ROW()-2,ROWS(Data)-1)+1,QUOTIENT(ROW()-2,ROWS(Data)-1)+1)
B10 =OFFSET(Data::$A$1,MOD(ROW()-2,ROWS(Data)-1)+1,QUOTIENT(ROW()-2,ROWS(Data)-1)+1)
B11 =OFFSET(Data::$A$1,MOD(ROW()-2,ROWS(Data)-1)+1,QUOTIENT(ROW()-2,ROWS(Data)-1)+1)
B12 =OFFSET(Data::$A$1,MOD(ROW()-2,ROWS(Data)-1)+1,QUOTIENT(ROW()-2,ROWS(Data)-1)+1)
* Tables are built with Numbers v2.
Regards,
H
Similar Messages
-
Displaying data from multiple columns into a single line graph
Post Author: hollowmatrix
CA Forum: WebIntelligence Reporting
Hey,I have an issue with the WEBI reporting.I have a data source that has multiple columns say ( month1, month2, month3, month4,.....month 12, month 13, ....month24) with the sales data for each month.Now say I call the month 1 to month 12 as "current year", and call month 13 - month 24 as "previous year".I want to put a prompt in the report which allows me to select between "current year" and "previous year".Based on the prompt value we get a graph of the sales vs month ....as in if we select "current year", then we get a graph of the sales Vs time( remember that the sales data for each month is in a different column.)and if we select "previous year" then we get a graph of the sales Vs time for previous year..( sales vs time for Month 13, month 14, month 15....month 24).I am not able to pull data from multiple columns into a single object that I can use to populate the graphs.Any help on the same will be appreciated .Hi,
<p>
please click
here (asktom) and look for the words "how about the other way round"
</p> -
Comparison of multiple column values with a single column value
I have two separate tables say Tab1 and Tab2
I want to select some datas , which is common to both the tables.
In tab1 , there is a column 'STATE' and it's value is 'A'
In tab2, there are multiple columns for the state, say STATE_A,STATE_B, STATE_C ETC and a row is present with the following details
STATE_A = 1, STATE_B =1 ,STATE_C =0,STATE_D=1
I need to select STATE when STATE_A ='1',
if my STATE='B', this STATE has to be selected since STATE_B =' 1', similraly
if my STATE='D', this STATE has to be selected since STATE_D =' 1',
If my STATE='C', STATE_C should not get selected since it's '0'.
Is it possible to do this in a single SELECT statement, where I have some other checks also or else how can I achieve it?Maybe this will help
Select * from STATE_MAS ;
STATE
A
B
D
F
H
Select * from STATE_CHILD
STATE_A STATE_B STATE_C STATE_D STATE_E STATE_F STATE_G STATE_H STATE_I STATE_J
1 0 0 1 1 0 0 0 0 0
CREATE OR REPLACE FUNCTION GET_STATE (P_VAL VARCHAR) RETURN NUMBER IS
V_SQL VARCHAR2(200);
V_COL VARCHAR2(35);
P_RETURN NUMBER ;
BEGIN
V_COL := 'STATE_'||P_VAL;
V_SQL := 'SELECT 1 FROM STATE_CHILD WHERE '||V_COL||' = 1 ';
EXECUTE IMMEDIATE V_SQL INTO P_RETURN ;
RETURN P_RETURN ;
END;
SELECT STATE FROM STATE_MAS
WHERE GET_STATE(STATE) = 1 ;
STATE
A
D -
How do i print multiple columns on 1 page in numbers
I think I am over thinking this but I have confused myself. I am using Numbers to create a spreadsheet of family names with their corresponding number. I would like to print multiple columns of names on one page to save paper but I can't figure how to do it. Will someone please help me???
Hi BestMommy,
Here is one way. Don't mess with your database. Create a new table for printing.
Database with a Header Row (named Table 1 as an example) might look like this:
Name
1
Name 1
2
Name 2
3
Name 3
4
Name 4
5
Name 5
6
Name 6
7
Name 7
8
Name 8
9
Name 9
10
Name 10
11
Name 11
12
Name 12
13
Name 13
14
Name 14
15
Name 15
New table for printing:
Name
Name
1
Name 1
8
Name 8
2
Name 2
9
Name 9
3
Name 3
10
Name 10
4
Name 4
11
Name 11
5
Name 5
12
Name 12
6
Name 6
13
Name 13
7
Name 7
14
Name 14
Formula in A2
=Table 1::A2
Formula in B2
=Table 1::B2
Formula in C2
=Table 1::A9
Formula in D2
=Table 1::B9
So it loops back from the bottom of a page to start a new column.
I made this example small for the pics, but obviously you could have more rows and columns per page.
Having created your table for printing, select it, Cut, add a new sheet and Paste. Print just that sheet.
Have a look at 'More Like This' at the bottom of this page. Trying to format page to print table in two columns Jerry suggests using Pages instead of Numbers.
Regards,
Ian.
Edit: Having created your table for printing, select it, Cut, add a new sheet and Paste. Print just that sheet. Ian. -
How to calculate the individual sums of multiple columns in a single query
Hello,
Using Oracle 11gR2 on windows 7 client. I have a question on calculating sum() on multiple columns on different columns and store the results in a view. Unfortunately I could not post the problem here as it keeps on giving error "Sorry, this content is not allowed", without telling where or what it is! So I had to post it in the stack-overflow forum, here is the link: http://stackoverflow.com/questions/16529721/how-to-calculate-the-individual-sums-of-multiple-columns-in-a-single-query-ora
Will appreciate any help or suggestion.
Thanksuser13667036 wrote:
Hello,
Using Oracle 11gR2 on windows 7 client. I have a question on calculating sum() on multiple columns on different columns and store the results in a view. Unfortunately I could not post the problem here as it keeps on giving error "Sorry, this content is not allowed", without telling where or what it is! So I had to post it in the stack-overflow forum, here is the link: http://stackoverflow.com/questions/16529721/how-to-calculate-the-individual-sums-of-multiple-columns-in-a-single-query-ora
Will appreciate any help or suggestion.
ThanksLooks like you want a simple group by.
select
yr
, mnth
, region
, sum(handled_package)
, sum(expected_missing_package)
, sum(actual_missing_package)
from test
group by
yr, mnth, region
order by
yr, mnth, region;I wouldn't recommend storing your data for year / month in 2 columns like that unless you have a really good reason. I would store it as a date column and add a check constraint to ensure that the date is always the first of the month, then format it out as you wish to the client.
CREATE TABLE test
year_month date,
Region VARCHAR2(50),
CITY VARCHAR2(50),
Handled_Package NUMBER,
Expected_Missing_Package NUMBER,
Actual_Missing_Package NUMBER
alter table test add constraint firs_of_month check (year_month = trunc(year_month, 'mm'));
ME_XE?Insert into TEST (year_month, REGION, CITY, HANDLED_PACKAGE, EXPECTED_MISSING_PACKAGE, ACTUAL_MISSING_PACKAGE)
2 Values (to_date('2012-nov-12', 'yyyy-mon-dd'), 'Western', 'San Fransisco', 200, 10, 5);
Insert into TEST (year_month, REGION, CITY, HANDLED_PACKAGE, EXPECTED_MISSING_PACKAGE, ACTUAL_MISSING_PACKAGE)
ERROR at line 1:
ORA-02290: check constraint (TUBBY.FIRS_OF_MONTH) violated
Elapsed: 00:00:00.03
ME_XE?Insert into TEST (year_month, REGION, CITY, HANDLED_PACKAGE, EXPECTED_MISSING_PACKAGE, ACTUAL_MISSING_PACKAGE)
2 Values (to_date('2012-nov-01', 'yyyy-mon-dd'), 'Western', 'San Fransisco', 200, 10, 5);
1 row created.
Elapsed: 00:00:00.01
ME_XE?select
2 to_char(year_month, 'fmYYYY') as year
3 , to_char(year_month, 'fmMonth') as month
4 , Region
5 , CITY
6 , Handled_Package
7 , Expected_Missing_Package
8 , Actual_Missing_Package
9 from test;
YEAR MONTH REGION CITY HANDLED_PACKAGE EXPECTED_MISSING_PACKAGE ACTUAL_MISSING_PACKAGE
2012 November Western San Fransisco 200 10 5
1 row selected.
Elapsed: 00:00:00.01
ME_XE?Then you have nice a nice and easy validation that ensures you data integrity.
Cheers, -
Can data be sorted by multiple columns in numbers version 3
Since upgrading Numbers to version 3 (now 3.0.1) I have been unable to sort data in spreadsheets using multiple columns. Anyone found a solution?
Regards
kurrajong60Here's a simple example. Say you want this sorted first by Region then by Name then by Amount.
So if you set up a sort index column with a simple formula and all you have to do is this (two clicks):
Giving you this:
Of course you could do it as I think Hiroto is suggesting and manually sort first by column B, then sort by C, then sort by A.
But that's a lot of trouble and it's easy to confuse the order so you end up having to start over again.
SG -
How to insert from one table to another (multiple columns to single column)
I want to insert data from table1 into table2 and the data looks in 3 columns as below
Table1
RepNm ObjNm DbNm
123 abc def
456 def xyz
789 123 456
and the data in table2 should be display as
Table 2
ObjNm
123
456
789
abc
def
xyz
the dupes should get eliminated and only the distinct values should be inserted into a single column in table2 from multiple columns in table1How do you want to handle nulls? If there is a null in any value of a column, do you want to insert it?
Then,
WITH T
AS (SELECT LEVEL colnum
FROM DUAL
CONNECT BY LEVEL <= 3)
SELECT DECODE (colnum, 1, RepNm, 2, ObjNm, 3, DbNm) as ObjNm
FROM table1, T;if you dont want to insert nulls then,
WITH T
AS (SELECT LEVEL colnum
FROM DUAL
CONNECT BY LEVEL <= 3)
SELECT DECODE (colnum, 1, RepNm, 2, ObjNm, 3, DbNm) AS ObjNm
FROM table1, T
WHERE DECODE (colnum, 1, RepNm, 2, ObjNm, 3, DbNm) = DECODE (colnum, 1, RepNm, 2, ObjNm, 3, DbNm)G. -
Performance of update query for single column vs multiple column
Hi All,
I could not find any answer for this, does it ever matter in terms of performance updating single column versus multiple column in a single update query.
For eg. table consisting of 15 columns, what would be the difference in performance when one column is update in the single query against another update query where 15 columns are updated.
Please do keep in mind my table columns in actually could be around 150+.
Thanks for any information provided.If updated columns aren´t on where clause , then the only impact of 15 columns will be a increase on redo generation, and a possible chainning row.
So since the redo is one of the things that have a large impact, the answer is yes.
The performance will be slower.
Regards
Helio Dias.
http://heliodias.com
OCE SQL, OCP 9i -
NamedQuery problem- single argument compared to multiple columns
Hello,
I'm not sure if this issue is a bug or if I'm misinterpreting the API. I'm trying to execute a text search query against multiple columns in the same table via EJB 3.0, e.g.
select object(o) from Location o where o.city LIKE :searchString OR o.county LIKE :searchString"So, a single text argument is compared to multiple fields- but I keep getting an exception that the number of supplied arguments (one) does not match the number of required arguments (one- even though it's ID is referenced twice). Is there a separate syntax for repeating arguments in EQL (EJB 3.0, JDeveloper 10.1.3)? Is it not supported?
I get around the issue by just specifying a Query at runtime, but I'd prefer --if possible-- to create a NamedQuery instead.
Any help would be appreciated. Take care.Should the EJBQL statement be
select object(o) from Location o where o.city LIKE :?1 OR o.county LIKE :?2 -
Turn off a single plot of a multiple plot waveform graph
I have a multiple plot waveform graph (4 plots). I want to turn off one of the plots, say plot 2. Is this posible from the graphs property node? The property node seems to only give a reference to plot 0. I am using labview 7.
Cheers,
WayneI think you can use "active plot" together with "plot.visible"
property node to control which one you'd like to display. By default,
the property node refers to plot 0, but you can change to plot 1 or
other plots by changing active plot property node. You can search
"Plot" in LabVIEW Help if you'd like to know details.
Good luck,
Jian
On 18 Feb 2004 03:28:49 GMT, [email protected] (Computerman74)
wrote:
>>
>>I have a multiple plot waveform graph (4 plots). I want to turn off
>>one of the plots, say plot 2. Is this posible from the graphs
>>property node? The property node seems to only give a reference to
>>plot 0. I am using labview 7.
>>Cheers,
>>Wayne
>>
>>
>>
>>
>>
>>
>
>I would love to know if this is possible. I have been trying to figure i
t out
>myself.
>There is a way to turn a single array off and that is what I am doing for now
>untill this is possible. The plot is still there but reads zero when tunred
>off. It would be cool to have the abillty to turn off a single plot.
>I have tryed all the property nodes with no luck. The answer may be in the
>array size but I can't seem to control that either.
>For now you can use wire all 4 channels using the comparison select. Use a
>constant of 0 And wire up a swtich. When the input is false the output is zero
>in effect making the plot inactive but it still there. -
Single graph, multiple loops
Hello,
I have a (hopefully) simple problem with a (hopefully) simple solution. The picture explains it best I think.
There are three queues firing at different times, thus necessitating three independent FOR loops. I need to be able to plot the output from each FOR loop onto a single graph.
Any suggestions?
Thanks in advanceHey John,
OK I looked at the picture and we STILL need a thousand words. Put each for loop in its own independent structure. Then they can run in multiple threads. Right now the while loop you have will not iterate until ALL of the for loops finish. This style does not make it easy to extend or maintain when the assumption that the arrays have the same number of points becomes invalid (that is, always code around assumptions)
Now to break my own advice, I'm assuming the user REALLY needs the data graphed, and the experiment cannot provide a result based on analysis of the data that you are graphing. BUT- CHECK THIS ASSUMPTION before we go too far down the wrong road!
As I said, before waxing philosophically, your code needs some improvement to abstract the display functionalities and make them less dependent on the UI in this code level. Or, to restate, you need LVOOP concepts!
One of the simplest ways to do this is to use an "Action Engine" to maintain the data in the UI graph. You can pass a reference to the existing graph into this AE and use "Actions" (methods) "Clear", "Adopt", "Appendto.Plot" etc...
In this case I would also think about changing the graph into an "X-Control." An X=Control allows code to be executed dependent on the action being performed on the data, like an AE but, with better handling of resource when called asynchronously from multiple locations. For really good advice on how to go this route poke an NI KNIGHT. cus you've gotten out of my league (I know the concepts and theory, I've used X-Controls, but I lack the amount of practical experience some of these Knights have with the newer powerful LV architectures)
Reguardless- keep me posted! your code looks interesting!
Jeff -
Merge statement - update multiple columns from a single sub-select
Is it possible to write in 10gR2, a MERGE statement, with UPDATE for multiple columns from a single sub_select?
like this:
MERGE INTO tableA
using ( select * from temp) tmp
on( tableA. col1 = tmp.col1)
when matched then
update set ( tableA.col5,
tableA.col6,
tableA.col7) = ( select sum(col2), sum(col3), sum(col5)
from tableX
where tableX.col1 = tableA.col1...)Hi,
The USING clause is not a sub-query, so it can't reference columns from tables that are not in it.
Include tableA in the USING clause if you really need to refer to it there. (It's not obvious that you do.)
As always, it helps if you post:
(1) The version of Oracle (and any other relevant software) you're using
(2) A little sample data (just enough to show what the problem is) from all the relevant tables
(3) The results you want from that data (In the case of a DML statement, such as MERGE, this will be the state of the tables when everything is finished.)
(4) Your best attempt so far (formatted)
(5) The full error message (if any), including line number
Executable SQL statements (like "CREATE TABLE AS ..." or "INSERT ..." statements) are best for (2).
If you can present your problem using commonly available tables (for example, tables in scott schema, or views in the data dictionary), then you can omit (2).
Formatted tabular output is okay for (3). -
Update multiple columns with single update statement..
HI all,
i am reading the columns value from different table but i want to update it with signle update statement..
such as how to update multiple columns (50 columns) of table with single update statement .. is there any sql statement available i know it how to do with pl/sql..As I understood, may be this. Here i am updating ename,sal, comm columns all at once.
SQL> select * from emp where empno=7369;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7369 SMITH CLERK 7902 17/12/1980 12:00:00 800 20
SQL> UPDATE emp
2 SET ename = lower (ename),
3 sal = sal + 1000,
4 comm = 100
5 WHERE empno = 7369;
1 row updated.
SQL> select * from emp where empno=7369;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7369 smith CLERK 7902 17/12/1980 12:00:00 1800 100 20
SQL> UPDATE emp
2 SET ename = (SELECT 'ABCD' FROM DUAL),
3 sal = (SELECT 1000 FROM DUAL),
4 comm = (SELECT 100 FROM DUAL)
5 WHERE empno = 7369;
1 row updated. -
Merge multiple rows into single row (but multiple columns)
How to merge multiple rows into single row (but multiple columns) efficiently.
For example
IDVal IDDesc IdNum Id_Information_Type Attribute_1 Attribute_2 Attribute_3 Attribute_4 Attribute_5
23 asdc 1 Location USA NM ABQ Four Seasons 87106
23 asdc 1 Stats 2300 91.7 8.2 85432
23 asdc 1 Audit 1996 June 17 1200
65 affc 2 Location USA TX AUS Hilton 92305
65 affc 2 Stats 5510 42.7 46 9999
65 affc 2 Audit 1996 July 172 1100
where different attributes mean different thing for each Information_type.
For example for Information_Type=Location
Attribute_1 means Country
Attribute_2 means State and so on.
For example for Information_Type=Stats
Attribute_1 means Population
Attribute_2 means American Ethnicity percentage and so on.
I want to create a view that shows like below:
IDVal IDDesc IDNum Country State City Hotel ZipCode Population American% Other% Area Audit Year AuditMonth Audit Type AuditTime
23 asdc 1 USA NM ABQ FourSeasons 87106 2300 91.7 46 85432 1996 June 17 1200
65 affc 2 USA TX AUS Hilton 92305 5510 42.7 46 9999 1996 July 172 1100
ThanksHi,
That's called Pivoting . The forum FAQ has a section on this subject: {message:id=9360005}
I hope this answers your question.
If not, post your best attempt, along with a little sample data (CREATE TABLE and INSERT statements, relevant columns only), and also post the results you want from that data. (You did post the results you wanted, but they're very hard to read because they're not formatted. Use \ tags, as described in the forum FAQ, below.)
Explain, using specific examples, how you get the results you want from the data given.
Always say which version of Oracle you're using (e.g., 11.2.0.2.0). This is always important, but especially so with pivots.
See the forum FAQ {message:id=9360002} -
Converting multiple column in single column
Hi All,
I need to create a table with single column by using select statement with multiple columns
For Ex- i have 1 row with 10 columns (may be more than 10) like
'A','B','C','D','E','F','G','H',I','J'
i written sql like
select 'A','B','C','D','E','F','G','H','I','J' from dual
result is - 'A','B','C','D','E','F','G','H','I','J' with 10 columns
Now i need output lik this using SQL
Text
'A'
'B'
'C'
'D'
'E'
'F'
'G'
'H'
'I'
'J'
Please help me to sort out this problem. Your help would highly appropriated.
Regards
Raju
Edited by: 888667 on Apr 8, 2013 10:54 PM
Edited by: 888667 on Apr 8, 2013 10:56 PMWelcome to the forum!!! You can convert column to row like this
SQL>with my_table
2 as
3 (
4 select 'A' col1,'B' col2,'C' col3,'D' col4,'E' col5,'F' col6,'G' col7,'H' col8,'I' col9,'J' col10
5 from dual
6 )
7 select decode(no , 1, col1, 2, col2, 3, col3, 4, col4, 5, col5, 6, col6, 7, col7, 8, col8, 9, col9, 10, col10) col
8 from my_table
9 cross join (select level no from dual connect by level <= 10)
10 /
C
A
B
C
D
E
F
G
H
I
J
10 rows selected.
SQL> To ask question in a better way please read {message:id=9360002} from FAQ
Maybe you are looking for
-
Add one effect to all pictures
Hi, I'm creating a slideshow in iDVD with about 117 pictures and was wondering if there was a way to add a cross-dissolve transition to all of those pictures in one shot. Any help is greatly appreciated. -Moeed PowerPC G5 Mac OS X (10.4.9) None
-
Where is the gray back arrow? Where is popup blocker??
What's with this new Safari? Why is this better than the former version? TominTexas
-
Adobecontrol.dll problem
hi,all I've got a problem using upload PDF in interactive form. whenever i upload a pdf file.the IE(7.0) is crashed and it tells me that problem is caused by adobecontrol.dll. And the application is running normally at other people's IE. I just want
-
HT3775 quicktime x does not open avi!!
HT3775 article states that Quicktime x supports avi formats. However, when I try to open an avi movie, it tells me it cannot open and the format is not supported!!! At one point it also told me that the codec does not exist. Any ideas?
-
How can I create an html mail template? I've read that Mail can't handle sending html without always going through Safari, but I'm hoping that has changed. Basically, I just want to include by logo in my signature, so it' not complicated html. Thanks