Pivot Table from multiple Data Tables containing same row headers, different dat
ID: 3569754 • Letter: P
Question
Pivot Table from multiple Data Tables containing same row headers, different data
Hello all!!
I have a workbook with several worksheets/tabs for each fiscal month. Each tab contains the same row headers, and rows of invoices with a few calculated columnss..
I know that I could copy/paste all of them below one another into one table, but let's just suppose that I can't (reasons like, too many formulas would have to be calculated, or too many people would have to be convinced and then taught to import each month into one table, etc).
Is there a way to create a Pivot Table to refer to all tables (which are in their own tabs in the same workbook), with fields being the row header categories, but maybe with an extra field for "month" to differentiate data from different tabs??
Thank!!
Explanation / Answer
nclude<stdio.h>
#include<conio.h>
#include<stdlib.h>
#define MAX 50
int size;
// Defining the stack structure
struct stack {
int arr[MAX];
int top;
};
// Initializing the stack(i.e., top=-1)
void init_stk(struct stack *st) {
st->top = -1;
}
// Entering the elements into stack
void push(struct stack *st, int num) {
if (st->top == size - 1) {
printf(" Stack overflow(i.e., stack full).");
return;
}
st->top++;
st->arr[st->top] = num;
}
//Deleting an element from the stack.
int pop(struct stack *st) {
int num;
if (st->top == -1) {
printf(" Stack underflow(i.e., stack empty).");
return NULL;
}
num = st->arr[st->top];
st->top--;
return num;
}
void display(struct stack *st) {
int i;
for (i = st->top; i >= 0; i--)
printf(" %d", st->arr[i]);
}
int main() {
int element, opt, val;
struct stack ptr;
init_stk(&ptr);
printf(" Enter Stack Size :");
scanf("%d", &size);
while (1) {
printf(" tSTACK PRIMITIVE OPERATIONS");
printf(" 1.PUSH");
printf(" 2.POP");
printf(" 3.DISPLAY");
printf(" 4.QUIT");
printf(" ");
printf(" Enter your option : ");
scanf("%d", &opt);
switch (opt) {
case 1:
printf(" Enter the element into stack:");
scanf("%d", &val);
push(&ptr, val);
break;
case 2:
element = pop(&ptr);
printf(" The element popped from stack is : %d", element);
break;
case 3:
printf(" The current stack elements are:");
display(&ptr);
break;
case 4:
exit(0);
default:
printf(" Enter correct option!Try again.");
}
}
return (0);