Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
tmumaw
Specialist II
Specialist II

% to Gross Sales

I have a pivot table which has the following lines:

A: Gross Sales    2000.00

B: Base Payroll      500.00

C: Benefits             250.00

😧 Equipment         250.00

E: Materials            500.00

My user wants to know what % Base Payroll is to Gross Sales, what % Benefits are to Gross Sales,  what % Equipment is to Gross Sales, what % Materials are to Gross Sales. Any ideas?

Thanks

9 Replies
Not applicable

Hi Thom

I think you can do it with Set Analysis.

For example Base Payroll to Gross:

SUM(measue_value) / SUM({<measure_name = {'Gross Sales'}>} measure_value)

Lukasz

MK_QSL
MVP
MVP

kindly provide some more dimension names as these data are not enough to give answer...

tmumaw
Specialist II
Specialist II
Author

My dimension for the following is GL Hier 2

A : Gross Sales

B:  Base Payroll 

C:  Benefits

😧  Materials 
E:  Equipment 

Not applicable

I think Lukasz's answer is correct.

Just adapt the field names of the answer to your model to get it work.

Fabrice

aveeeeeee7en
Specialist III
Specialist III

Dear Thom

See the Attachment

Regards

Aviral Nag

Not applicable

try,

% base payroll to gross sales

num(sum([base payroll]) / (sum([gross sales]), '##%')

% benefits to gross sales

num(sum(benefits) / (sum([gross sales]), '##%')

%equipment

num(sum(equipments) / (sum([gross sales]), '##%')

%materials

num(sum(materials) / (sum([gross sales]), '##%')

tmumaw
Specialist II
Specialist II
Author

This would be great if it wasn't a pivot table.  My pivot table has 3 dimensions (GL Hier 2 (which is what I shared) , GL Hier 3 and GL Acct) with one measure GL Amount.  I need to show these %'s at all levels of the pivot table, so I can't just name things like Gross Sales, Benefits, Equipment, etc..

tmumaw
Specialist II
Specialist II
Author

Any ideas?

Not applicable

if u send me an example will the pivot table i will be able to help u