Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have created a pivot table from different source table. I want to build a new source table (qvd) from this pivot table, and add a new empty column?
RGDS.
Hi,
I do it this way:
I run this macro after reaload
sub EXPORT()
set obj = ActiveDocument.GetSheetObject("CH01")
obj.ExportEx "C:\NewSource.qvd", 4
end sub
CH01: PivotTable ID
Now I don't remember which parameter is "4", but you can find in the APIGuide...
sorry! do not understand what you mean with: "and add a new empty column". Why you need to?
Thx very much 🙂
Rgds
i would to add a new col on my pivot table, this col doesn't exist in my source table, i had used inline load table, it work thx
But i have another problem!
I calcul in my pivot table sum of turn over by proudct for every company. i want to add a new colomun wich contain the name of the company with the max turn over.
I do not know if I understood everything right. My English is bad!
you get the data (IdCompany, Sales, ...) from the corresponding source (SQL, XLS). Then, do you want to add the name of the company?
if so, use "join" or "left join" or ... to add the names from another source (inLine, xls, ...)
Table1:
LOAD
CompanyID,
Product,
.
.
.
sum(Sales)
FROM .....
GROUP BY .....;
left join (Table1)
LOAD
CompanyID,
CompanyName
FROM .....;
No! I have this pivot table
Product | Sum turn over |
P1 | 40 |
For P1: Sum turn over = turn over(company1) + turn over(company2) + turn over(company3)
10 + 20 + 10
I want in my pivot table add column ' Best turn over company' which contain the name of company with max turn over, in my example: company2
New pivot table:
Product | Sum turn over | Best turn over company' |
P1 | 40 | company2 |
Hi,
Add this new expression:
=If (Turn_Over_Comp1 > Turn_Over_comp2 and Turn_Over_Comp1 > Turn_Over_comp3, 'Company 1',
If (Turn_Over_Comp2 > Turn_Over_comp1 and Turn_Over_Comp2 > Turn_Over_comp3, 'Company 2' , 'Company 3'))
This was useful for you?