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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
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
effinty2112
Master
Master

Hi,

The excel file you provide only has these fields:

 

IN_TIME
OUT_TIME
M_DATE
REMARKS
STATUS
TOT_DUR

WORK_HRS

EMP_NAME, DEPT_NAME and DEPT_NUM are missing, can you give rest of the data?


Regards

Not applicable
Author

Hi

Please find the dept info below

DEPT_NO      DEPT_NAME

1                    Chairman

101                HR

102                IT

103                Inspector

120                Finance

121                Quality

DEPT_no is common between both the tables. I have renamed the Emp_name due to security reason.

Thanks

effinty2112
Master
Master

Hi Daniesh,

I don't see a DEPT_NO field in your Excel file to line with the other table.

Not applicable
Author

Hi

Hi,

Dept no is included in the excel file.

Thanks

Not applicable
Author

Hi ,

Please assist me on this.

Not applicable
Author

Hi Daniesh,

   Go to expression tab. Expand the expression by pressing + and under background set the value like 20% red and 30% yellow.

Not applicable
Author

Hi Soma,

I tried using the your expression but i am getting error.

I clicked on background colour, and put the expression as if(percentage = 20%),RED,

I am getting an error,I am using pivot table.

Please suggest

Not applicable
Author

Hi Daniesh,

Check out the attached file.

maxgro
MVP
MVP

maybe

if((Sum(Field) / sum(TOTAL Field)) <= .20, RGB(255,0,0),              /* 0...20% red */

if((Sum(Value) / sum(TOTAL Field)) <= .30, RGB(255,255,0),        /* 20%...30% yellow */ 

if((Sum(Value) / sum(TOTAL Field)) <= .40, RGB(192,192,192),  /* 30%...40%  you didn't define this */

RGB(0,255,0)                                                                                          /* > 40%  green */

)))    //  3 if, 3 )