Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
upaliwije
Creator II
Creator II

Ratio Calculation

Hi Friends

DESCRIPTIONACTUAL    2014Actual RatioACTUAL    2013Actual Ratio
SALES7,332,885100967,954100
LABOUR339,5275222,2625
MATERIAL831,33811338,96911
COMMISSION890,1251275,00012
GROSS_PROFIT5,271,89672331,72272
STAFF_EXP853,4941240,00012
ADMIN_EXP857,4511280,00012
SELLING_EXP509,6397100,0007
TOTAL_EXPENSES2,220,58430220,00030
OTH_INCOME40,000140,0001
NET_PROFIT3,091,31242151,72242

I have calculated Actual Ratio bases on the Sales Value of Each Year for 2014 and 2013.But The calculation returns the same ratios for  both years . Kindly have look at my QV document and help me to correct the expression to suit my requirement

Ex

Labour/Sales *100    339527/7332885*100=5%

Marerial/Sales*100     831338/7332885*100=11%

20 Replies
upaliwije
Creator II
Creator II
Author

Pls help me with an answer

ariel_klien
Specialist
Specialist

Hi

change the variable to:

vActual = sum(if(DESCRIPTION='SALES',ACTUAL))

vBudget = sum(if(DESCRIPTION='SALES',BUDGET))

BR

Ariel

jagan
Luminary Alumni
Luminary Alumni

Hi,

Did you tried my earlier reply.

Regards,

Jagan.

upaliwije
Creator II
Creator II
Author

Tried But It won't Work.

Will you please further look into this and help me

ariel_klien
Specialist
Specialist

try to change the variable with 'IF' like in my earlier replay

Anonymous
Not applicable

PFA

upaliwije
Creator II
Creator II
Author

Still not working please

upaliwije
Creator II
Creator II
Author

Thanks Gupta

Your expression is working. You have created variable for each year. Is there a possibility of creating one variable and specifying the year through the expression. If possible Pls let me know

jyothish8807
Master II
Master II

Hi Upali,

PFA.

This automated as you want.It is depended on Single variable.

When you select 2013 the date will chage for 2013 and when you select 2014 the numbers will change.

Hope it may help.

Regards

KC

Best Regards,
KC
upaliwije
Creator II
Creator II
Author

Thanks Kc

I am almost there with your QV document. But there is a little problem with the Ratio Calculation for the year 2013. Because I want Figures to appear in respect of several Years in different columns. Pls check and advise me