Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
talita_verdes
Partner - Contributor III
Partner - Contributor III

Chart with different dimensions

Good Morning

I have a question and I do not know how to solve it


Following:
I have a telemarketing employee rests table by estimated hour and time taken.
The table is as follows:

   

EmployeeIDHour estimatedHour taken
109:0009:00
209:0009:00
315:0009:00



The problem is that I have to do a line chart per hour indicating how many people were estimated to pause at 9:00 and how many actually stopped.


In the example above was to have the following answer:
At 9:00 am Estimated pause = 2, pause performed = 3


The biggest problem is that the time dimension is different columns.
If done in different graphs is correct when together gives always the same value to realized and estimated.


Already tried:

1- Create a separate dimension of estimated time

2- Count by set analysis disregarding the dimension

3- Have already tried count employeeId with IF

What can I do?

Thanks

1 Solution

Accepted Solutions
sunny_talwar

Check this out

Script

Table:

LOAD * INLINE [

    EmployeeID, Hour estimated, Hour taken

    1, 09:00, 09:00

    2, 09:00, 09:00

    3, 15:00, 09:00

];

LinkTable:

LOAD Distinct EmployeeID,

[Hour estimated] as Hour,

'Estimated' as Flag

Resident Table;

Concatenate (LinkTable)

LOAD Distinct EmployeeID,

[Hour taken] as Hour,

'Taken' as Flag

Resident Table;

Straight table

Dimension

Hour

Expressions

=Count(DISTINCT {<Flag = {'Estimated'}>} EmployeeID)

=Count(DISTINCT {<Flag = {'Taken'}>} EmployeeID)

Pivot Table

Dimensions

Hour

Flag

Expression

=Count(DISTINCT EmployeeID)

Capture.PNG

View solution in original post

1 Reply
sunny_talwar

Check this out

Script

Table:

LOAD * INLINE [

    EmployeeID, Hour estimated, Hour taken

    1, 09:00, 09:00

    2, 09:00, 09:00

    3, 15:00, 09:00

];

LinkTable:

LOAD Distinct EmployeeID,

[Hour estimated] as Hour,

'Estimated' as Flag

Resident Table;

Concatenate (LinkTable)

LOAD Distinct EmployeeID,

[Hour taken] as Hour,

'Taken' as Flag

Resident Table;

Straight table

Dimension

Hour

Expressions

=Count(DISTINCT {<Flag = {'Estimated'}>} EmployeeID)

=Count(DISTINCT {<Flag = {'Taken'}>} EmployeeID)

Pivot Table

Dimensions

Hour

Flag

Expression

=Count(DISTINCT EmployeeID)

Capture.PNG