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
ariel_klien
Specialist
Specialist

Hi

change the variable to:

vActual = sum({$<DESCRIPTION={'SALES'},YEAR=>}ACTUAL)

vBudget = sum({$<DESCRIPTION={'SALES'},YEAR=>}BUDGET)

BR

Ariel

Anonymous
Not applicable

I can't see the the similarity between values for both years.........in your application,

The values are different for different years..........

Whats your issue...

upaliwije
Creator II
Creator II
Author

Values are different  but the Ratio is same for both years

upaliwije
Creator II
Creator II
Author

Thanks

It is not working. Can apply it to my QV file and upload the files

ariel_klien
Specialist
Specialist

I attached the file

Anonymous
Not applicable

EVEN RATIO IS ALSO DIFFERENT ..............

Please see

Capture.PNG.png

jagan
Luminary Alumni
Luminary Alumni

Hi,

Put = in your variable declaration, then use this expression

(Sum(ACTUAL)/(vActual))*100

where vActual ::::: = sum({$<DESCRIPTION={'SALES'},YEAR=>}ACTUAL)

Putting = will evaluate the expression and stored values in variable.

Regards,

Jagan.

upaliwije
Creator II
Creator II
Author

Pls have a look at Years Sheet

upaliwije
Creator II
Creator II
Author

It wont give the desired results

DESCRIPTIONACTUAL    2014Actual RatioACTUAL    2013Actual Ratio
SALES7,332,88588967,95488
LABOUR339,5274222,2624
MATERIAL831,33810338,96910
COMMISSION890,1251175,00011
GROSS_PROFIT5,271,89664331,72264
STAFF_EXP853,4941040,00010
ADMIN_EXP857,4511080,00010
SELLING_EXP509,6396100,0006
TOTAL_EXPENSES2,220,58427220,00027
OTH_INCOME40,000040,0000
NET_PROFIT3,091,31237151,72237

Sales Ratio should be 100% (7332885/7332885)*100

and Ratio for both years are same