Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
cancel
Showing results for 
Search instead for 
Did you mean: 
jgarciaf106
Creator
Creator

How to obtain percentage based on 2 data values?

I need to obtain a percentage for a Bar Chart, with the dimension of Monthly results

The percentage is obtain from the number of resignations divided into the total employees of a company.

Resignations and Employees are two different tables, and both are organized by month.

How can I obtain the percentage if I used the month from Resignations as dimension gives one result if I used the month from Employees gives me another result.

Any suggestion?

2 Replies
effinty2112
Master
Master

Hi Andres,

If your two tables are associated on a month field then an expression like

count(EmployeeID)/count(ResignationID)

should work.

It would help if you posted some sample data so you could be given the expression using actual field names. Also there may be some issues that complicate matters that are not apparent from the brief outline you've given.

Kind regards

Andrew

jgarciaf106
Creator
Creator
Author

Hi Andrew,

I use the following expression:

count({$<[TO_Employee/CW_Type]={"Regular"},TO_RATE_1_or_2={"Yes"},[TO_Voluntary/Involuntary_Terminations]={"Voluntary"}>}TO_Employee_ID)/

count({$<HC_Employee\CW_Type={"Regular"},HC_RATE_1_or_2={"Yes"}>}HC_Employee_ID)

Where the first statement is related to the resignations and second statement is related to employee data.

I think the issue I am experiencing is related to the Dimension

Cause I am using the month from Resignation TO_Month  and  not the month from Employee data.

Thanks,