# QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
cancel
Showing results for
Did you mean:
Master II

## percentage calculation front end

Hi All,

I have two tables SALTable and COMMTable and want to do SAL % with COMM/SAL and GRADE.

SAL column have the nulls.

How to achieve the same in report front end as shown below reports.

SAL%:

=(Sum({<Year=, Quarter=, Month=,DATE={'>=\$(=vStartDate)<=\$(=vMaxDate)'}>}  SAL)

/

(Sum({<Year=, Quarter=, Month=,DATE={'>=\$(=vStartDate)<=\$(=vMaxDate)'}>}  COMM)))

if(SAL%>=0 AND SAL%<0.1,'0%-10%',

if(SAL%>=0.1 AND SAL%<0.2,'10%-20%',

if(SAL%>=0.2 AND SAL%<0.3,'20%-30%',

if(SAL%>=0.3 AND SAL%<0.4,'30%-40%',

if(SAL%>=0.4 AND SAL%<0.5,'40%-50%',

if(SAL%>=0.5 AND SAL%<0.6,'50%-60%',

if(SAL%>=0.6 AND SAL%<0.7,'60%-70%',

if(SAL%>=0.7 AND SAL%<0.8,'70%-80%',

if(SAL%>=0.8 AND SAL%<0.9,'80%-90%',

if(SAL%>=0.9 AND SAL%<1.0,'90%-100%')

Required Report Output:

1 Solution

Accepted Solutions
Partner

PFA file for solution.

Regards,

Jagan.

12 Replies
Partner

Hi most of it's done in to attached, you had an unwanted + in the sal% expression.

HTH - Andy

Master II
Author

Hi awhitfield,

Thanks for the quick solution.

How to achieve the below one in report?

I don't have SAL % in script.

Kindly help.

 Report2 SAL % No of Emps 0%-10% 14 10%-20% 0 20%-30% 0 30%-40% 0 40%-50% 1 50%-60% 0 60%-70% 0 70%-80% 0 80%-90% 0 90%-100% 0
Master II

Try let me us know,if it works.

sal% :

=Sum({<Year=, Quarter=, Month=,DATE={'>=\$(=vStartDate)<=\$(=vMaxDate)'}>}if(isnull(COMM),0,COMM))

/

Sum({<Year=, Quarter=, Month=,DATE={'>=\$(=vStartDate)<=\$(=vMaxDate)'}>}if(isnull(SAL),0,SAL))

Master II
Author

Hi ,

I am getting as shown below:

But I want to show like below:

 SAL % No of Emps 0%-10% 14 10%-20% 0 20%-30% 0 30%-40% 0 40%-50% 1 50%-60% 0 60%-70% 0 70%-80% 0 80%-90% 0 90%-100% 0

Master II
Author

Hi Kush141087,

I want to show all the GRADES even data is NULL.

 GRADE No of Emps 0%-10% 14 10%-20% 0 20%-30% 0 30%-40% 0 40%-50% 1 50%-60% 0 60%-70% 0 70%-80% 0 80%-90% 0 90%-100% 0