Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi ,
My Table is
Quater | Month | sales |
Q1 | jan | 1 |
Q1 | feb | 2 |
Q1 | mar | 3 |
Q2 | apr | 4 |
Q2 | may | 5 |
Q2 | june | 6 |
Q3 | july | 7 |
Q3 | aug | 8 |
Q3 | sep | 9 |
Q4 | oct | 10 |
Q4 | nov | 11 |
Q4 | dec | 12 |
and ouput should be sum of quaters should appear for each row
Quater | Month | sales | Total |
Q1 | jan | 1 | 6 |
Q1 | feb | 2 | 6 |
Q1 | mar | 3 | 6 |
Q2 | apr | 4 | 15 |
Q2 | may | 5 | 15 |
Q2 | jun | 6 | 15 |
Q3 | jul | 7 | 24 |
Q3 | aug | 8 | 24 |
Q3 | sep | 9 | 24 |
Q4 | oct | 10 | 33 |
Q4 | nov | 11 | 33 |
Q4 | dec | 12 | 33 |
thanks
Ram
Hi
Try like this
Table1:
Load * Inline
[
Quater,Month,sales
Q1,jan,1
Q1,feb,2
Q1,mar,3
Q2,apr,4
Q2,may,5
Q2,june,6
Q3,july,7
Q3,aug,8
Q3,sep,9
Q4,oct,10
Q4,nov,11
Q4,dec,12
];
Left Join
LOAD Quater, Sum(sales) as Total Resident Table1
Group by Quater;
Use sum(total <Quarter> sales) as expression for the Total column.
Hi
Try like this
Table1:
Load * Inline
[
Quater,Month,sales
Q1,jan,1
Q1,feb,2
Q1,mar,3
Q2,apr,4
Q2,may,5
Q2,june,6
Q3,july,7
Q3,aug,8
Q3,sep,9
Q4,oct,10
Q4,nov,11
Q4,dec,12
];
Left Join
LOAD Quater, Sum(sales) as Total Resident Table1
Group by Quater;
Hi ,
Try the code below:
Tab:
LOAD * INLINE [
Quater, Month, sales
Q1, jan, 1
Q1, feb, 2
Q1, mar, 3
Q2, apr, 4
Q2, may, 5
Q2, june, 6
Q3, july, 7
Q3, aug, 8
Q3, sep, 9
Q4, oct, 10
Q4, nov, 11
Q4, dec, 12
];
Tab1:
LOAD Quater,
Sum(sales) as Total
Resident Tab Group By Quater Order By Quater;
Hi Ramasamy,
Thank for ur reply...