Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
jgarciaf106
Creator
Creator

Issues obtaining a percentage

@hic

Hi I am new to Qlikview and need Some help, hopefully is an easy question, I need to obtain a monthly percentage of a data, in order to obtain the percentage in excel I would do number of employee resignation / number of current employees and that operation in Excel would give me the result, now in Qlikview I have One table for employee resignation and one table for Current Employees, both tables have in common the field month (This would be my dimension), so when I create 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)), I cannot obtain the correct results due I need to choose a Dimension Either The resignation (Month) Dimension or Current Employee Month Dimension, If I choose the first dimension (Resignation table) the expression that counts the data from Current employee is counted as total year data and not monthly, What Can I do for this expression to count only monthly data without the need of adding the current employee month dimension? Is it possible to create a conditional dimension to include both dimension? Can Someone give me some guidance?

4 Replies
Anil_Babu_Samineni

Are you getting accurate while using below?

(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"}>} TOTAL HC_Employee_ID))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
jgarciaf106
Creator
Creator
Author

Actually no,

Let me give some details say for example I use the second part of the expression

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

With the dimension from Current employee table, it gives me the monthly results I am looking for, but when I use the entire expression I need to either use the Dimension from the resignations table or the dimension from the current employee table;

if I use the complete expression with the dimension from  the resignation table the second expression uses the entire year results for each of the months instead of the different monthly results I expect.

I am not sure but the issue could be with the dimensions, so I do not know if both dimension could be use to give proper results, if there is a way of a conditional dimension like to user x dimension for the first expression and y dimension for the second expression.

Anil_Babu_Samineni

Would you mind, Can you share the values of below 2 expressions?

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

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

So, And what are you getting then what you are expecting?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
jgarciaf106
Creator
Creator
Author

Hi Anil,

Please find the following attachment with the results of each expression:

1) First Expression using TO_MONTH as Dimension

2) Second Expression Using TO_MONTH as Dimension

3)Second Expression Using HC_MONTH as Dimension

4)Complete Expression Using TO_MONTH as Dimension

5)Expected results from excel sheet I currently have my dashboard

As you can see on the second expression if I use another dimension that is not from the same table it count the entire year results as monthly results, and I need that the complete expressions Use the first expression using TO_Month as dimension and divided in to the second expression using HC_MOnth as dimension in order to

obtain the correct results.1st Expression.png2nd Expression (1).png2nd Expressio (2).pngComplete Expression.pngExpected Results.png