Skip to main content
Announcements
Get Ready. A New Qlik Learning Experience is Coming February 17! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
tracycrown
Creator III
Creator III

% computation

Dear all

Can someone help to enlightern me on how to compute the % in yellow below:

For example: Travel / School Fees = 25,000/500,000 = 5%

Desired Output
DescJan-10Jan-10
Actual%
School Fees500,000100.0%
Travel25,0005.0%
Stationery50,00010.0%
Salaries350,00070.0%
Total425,00085.0%


Thanks for your quick response, please send me a example QV file. Attached is an excel input file.

Tracy

1 Solution

Accepted Solutions
tracycrown
Creator III
Creator III
Author

Dear Zaman

This is exactly what I want but how come there is nothing in the script, please advise.

Thank you so much, Tracy

View solution in original post

12 Replies
Not applicable

Hi

See this file: SchoolComputing.qvw

Do u wants like this?

Thanks

Zaman



tracycrown
Creator III
Creator III
Author

Dear Zaman

This is exactly what I want but how come there is nothing in the script, please advise.

Thank you so much, Tracy

Not applicable

Hi Tracy

Please see this Qlikview documents for script and expressions.

Don't give reload on QlikView 10. You can use Qlikview 8.5 or 9

Thanks

Zaman

tracycrown
Creator III
Creator III
Author

Dear Zaman

Thanks for your quick response but I did not receive any email at all.

I don't understand the script below, please advise what does it mean and how do it ?.

[..\Example-1.xls]

(biff, embedded labels, table is Sheet1$, filters(Remove

(Row, Pos(Top, 3)),

Remove

(Row, Pos(Top, 1))));





I also notice that you had changed 'School Fees' to SchoolFees (without " " and space), is this the way to change a string to a memory variable ?.

If(Desc='School Fees',Sum (ActualValue)/SchoolFees,If(Desc='Travel',Sum (ActualValue)/SchoolFees,If(Desc='Stationery',Sum (ActualValue)/SchoolFees,If(Desc='Salaries',Sum (ActualValue)/SchoolFees,If(Desc='Total',Sum (ActualValue)/SchoolFees)))))

In addition, kindly advise how to create a total column in QV (which is not in Excel) showing sum of all months from Jan to Dec and %.

Thank you very very much, Tracy

Not applicable

Hi..

SchoolFees is a variable which Value is: = Sum(if(Desc='School Fees',ActualValue))

see on the Documents Properties then Variable

and this is the expression to view your output

If(Desc='School Fees',Sum (ActualValue)/SchoolFees,If(Desc='Travel',Sum (ActualValue)/SchoolFees,If(Desc='Stationery',Sum (ActualValue)/SchoolFees,If(Desc='Salaries',Sum (ActualValue)/SchoolFees,If(Desc='Total',Sum (ActualValue)/SchoolFees)))))

thanks

zaman

Not applicable

Hi..

Qus : In addition, kindly advise how to create a total column in QV (which is not in Excel) showing sum of all months from Jan to Dec and %.

Ans: Can you please show me your output on excel? and then send me please.

thanks

zaman

Not applicable

Hi,

Check this attached application.

Hope this will help you.

- Peterson.

tracycrown
Creator III
Creator III
Author

Dear Kevin

Thanks for your quick response, please advise why and how to do the following :

Remove

(Row, Pos(Top, 1

)),

Remove

(Row, Pos(Top, 2

)),

Transpose

(),

Remove

(Col, Pos(Top, 6))

Thank you so much for your help, Tracy





tracycrown
Creator III
Creator III
Author

Hi Zaman

Sorry, I was away for few days and unable to answer your response.

First of all, thank you so much for your explanation on memory variable, I understand how to do it now. This is an important topic and not sure why this is not on QV tutorial ?.

For the Total Column, I hope QV can do it dynamically depending on user selection. For example, if user highlights from Jan to Mar, then QV will sum all cost items from Jan to Mar in Total column and compute the %.

Thank you very much for your help, hope to hear from you soon. Tracy