Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

chart with two dimension and percentage

Hi ,

I want to create a graph with two dimensions PROD_NAME and Employee_name per total Count of duration.

I want to show the same in the same graph with percentage. I have a field like IN_TIME, OUT_TIME, EMP_NAME, TOT_DUR, DEPT_NAME, DEPT_NUM

The requirement is that EMP whose total count percentage is less than 20%, Display in RED colour.

                                                                                                        30%, Display in Yellow

                                                                                     obove or equal to 40%, Display Green,

Graph with EMP_NAME per TOT_DUR,

graph with DEPT_NAME per TOT_DUR, Must be displayed in the same graph.

Please assist me writing the expression and graph to use for this requirement.

Please suggest.

Thanks

13 Replies
Not applicable
Author

Hi

I was looking for this.

My expression would be like this.

if((count(TOT_DUR >='08:00' / count(TOTAL TOT_DUR)) <= .20, RGB(255,0,0),

if((count(TOT_DUR >='08:00' / count(TOTAL TOT_DUR)) <= .30, RGB(255,255,0),

if((count(TOT_DUR >='08:00' / count(TOTAL TOT_DUR)) <= .40, RGB(192,192,192),RGB(0,255,0) 


I will try and check

Thanks

maxgro
MVP
MVP

this doesn't seems correct

>='08:00'


It seems you want to count the TOT_DUR > 8 (8 hours? 8/24)

maybe you can add a flag in the db during the load for TOT_DUR >= 8 (something like if(...., 1, 0) as Flag

and then use the flag


count({$ <Flag={1}>} TOT_DUR) / count(TOTAL TOT_DUR)

Not applicable
Author

Hi Maxgro,

Thanks for update. We are checking the employees who has completed 8 Hrs.

I am using the below expression to get the count of employees of tot_dur >=8

count({1<TOT_DUR={'>=07:00'}>} TOT_DUR)


Which is giving the correct output. Now requirement to get the percentage of same. Based on that RED, Green and Yellow color is to be given to the value.


One more thing I am using Pivot table. I want to know which graph will look good for this.


Please suggest.

Thanks

Not applicable
Author

Hi

I tried the expression but i am getting the total of whole data.

Suppose one of the his tot_dur where he has completed 7 hours or more than 7 hrs is 162 out of total 362 Days.

percentage should be some where around 44 in my case first expression gives correct values but the second expression gives the whole total_dur. I need one to one like 162/367 not the whole tot_dur.

Please suggest.

Thanks