Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Everyone,
I need add % of Total Column to pivot table. I have a qvw attached. But I want result like excel attached.
Thank you very much for your comments.
Best regards.
Hi,
Try like below
Script:
Temp:
CrossTable(Parameter, Values)
LOAD Year,
Funded,
Unfunded,
Projected,
Goal
FROM
[..\Desktop\11.xlsx]
(ooxml, embedded labels, table is Sheet1);
Concatenate
LOAD Year,
'Gap' as Parameter,
Sum(If(Parameter='Goal',Values)) - Sum(If(Parameter<>'Goal',Values)) as Values
Resident Temp Group by Year,Parameter;
Expression:
Values => Sum(Values)
% => If(Parameter<>'Goal',Sum(Values) / Sum(Total <Year> {<Parameter -= {'Goal'}>}Values)
Output:
Not sure how you got that 50% in the excel but check the attached and let me know if this is what you want
Hi,
Try like below
Script:
Temp:
CrossTable(Parameter, Values)
LOAD Year,
Funded,
Unfunded,
Projected,
Goal
FROM
[..\Desktop\11.xlsx]
(ooxml, embedded labels, table is Sheet1);
Concatenate
LOAD Year,
'Gap' as Parameter,
Sum(If(Parameter='Goal',Values)) - Sum(If(Parameter<>'Goal',Values)) as Values
Resident Temp Group by Year,Parameter;
Expression:
Values => Sum(Values)
% => If(Parameter<>'Goal',Sum(Values) / Sum(Total <Year> {<Parameter -= {'Goal'}>}Values)
Output:
Thank you very much - qliksus and Tamil.