Skip to main content
Announcements
Do More with Qlik - Qlik Cloud Analytics Recap and Getting Started, June 19: REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
chinnuchinni
Creator III
Creator III

Logical task

Hi all,

I have a task.

i have two  tables one is for ticket table and one is employee table.

in ticket table i have ticket id's. in employee table i have emp_ID,emp_name.

with using these two tables,how can we assign the tickets to employees dynamically.

say example:

tickets:

ticket_id

1

2

3

4

5

6

7

emp_id   ,  emp_name

112          , Blenti

113          , sofi

115         ,  karim

please advice.

3 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

You can try this.

Load Ticket_ID,Pick(Ceil(3*Rand1),'112','113','115') as EmpID

From XYZ;

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
chinnuchinni
Creator III
Creator III
Author

any other better ways.

like i need to assign 1st 3 tickets to 3 employees,then again it should  repeat.

required o/p

like:

1    112

2    113

3    115

4    112

5    113.....and so on.

Thanks in advance

marcus_sommer

This adjusting should return your output:

Load Ticket_ID, Pick(mod(rowno(), 3) + 1,'112','113','115') as EmpID

From XYZ;

- Marcus