Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
upaliwije
Creator II
Creator II

Calculation in Pivot Table

Hi Freinds

I have following pivot table

DESCRIPTIONACTUALBUDGETVARIANCEACT_RATIOBUD_RATIODISCOUNTED_@_BUD_RATIOEXPECTED VALUE IN COLUMN 7
SALES8,300,8397,947,000353,8391001008,300,8398,300,839
LABOUR561,7891,234,564672,7757161,289,5331,289,533
MATERIAL1,170,307475,300(695,007)146496,463496,463
COMMISSION965,125938,137(26,988)1212979,907979,907
GROSS_PROFIT5,603,6195,298,999304,62068675,534,9365,534,936
STAFF_EXP893,494111,039(782,455)111893,494893,494
ADMIN_EXP937,451970,70033,2491112937,451937,451
SELLING_EXP609,639422,696(186,943)75609,639609,639
TOTAL_EXPENSES2,440,5841,504,435(936,149)29192,440,5842,440,584
OTH_INCOME80,00048,00032,0001150,13750,137
NET_PROFIT3,243,0353,842,564(599,529)39484,013,6543,144,490

The last two columns have identical figures except the net profit row. I want  to calculate the net profit figure (gross profit-Total Expenses+Oth Income). Pls help me achieve this. I have attached my QVW file and supporting Excel Files please.

1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi,

see the attached QVW.

Best regards

Stefan

View solution in original post

7 Replies
upaliwije
Creator II
Creator II
Author

Can Someone pls have look at my query and give solution

upaliwije
Creator II
Creator II
Author

Will you please help me to solve my issue

khasimvali85
Creator II
Creator II

Hi Upali,

          Use like this =sum(gross profit-Total Expenses+Oth Income)

            

Regards,

Khasim.

Anonymous
Not applicable

Hi,

use this expression for DISCOUNTED_@_BUD_RATIO, it produces the desired result:

if(DESCRIPTION <> 'NET_PROFIT' ,

If(DIS=3,SUM(ACTUAL),Sum(BUDGET)/$(=$(=vBudget))*$(=$(=vA_Ratio)))

,

SUM( TOTAL  {< DESCRIPTION = { GROSS_PROFIT,OTH_INCOME } >} If(DIS=3,ACTUAL,(BUDGET/$(=$(=vBudget))*$(=$(=vA_Ratio)))))-

SUM( TOTAL  {< DESCRIPTION = {TOTAL_EXPENSES} >}If(DIS=3,ACTUAL,BUDGET/$(=$(=vBudget))*$(=$(=vA_Ratio))) )

)

Best Regards

Stefan

upaliwije
Creator II
Creator II
Author

Will u please update the expression in QV document and attach the same

Anonymous
Not applicable

Hi,

see the attached QVW.

Best regards

Stefan

upaliwije
Creator II
Creator II
Author

Thanks a lot

Will U also help to calculate Actual Ratio Relating each year in the Year Sheet

DESCRIPTIONACTUAL    2014ACT_RATIOACTUAL    2013ACT_RATIO
SALES7,332,885100967,954100
LABOUR339,5277222,2627
MATERIAL831,33814338,96914
COMMISSION890,1251275,00012
GROSS_PROFIT5,271,89668331,72268
STAFF_EXP853,4941140,00011
ADMIN_EXP857,4511180,00011
SELLING_EXP509,6397100,0007
TOTAL_EXPENSES2,220,58429220,00029
OTH_INCOME40,000140,0001
NET_PROFIT3,091,31239151,72239