Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Everyone-
I am trying to create scenario in the script that ranks the top 10 departments (DEPT) based on overtime hours worked (OT HOURS). I'd like to create a variable for each department, 1 through 10. My goal is to take these variables and use them in my set analysis to say, for example ..... < DEPT = { 'Rank3' } > } .....
Any suggestions?
Thanks!
Mike
Can you provide sample data?
Simple script to get TOP in script can be done as below....
Temp:
Load * Inline
[
Customer, Sales,
A, 100
B, 80
C, 30
D, 300
E, 140
F, 60
A, 40
C, 80
D, 20
E, 30
];
NoConcatenate
Temp2:
Load Customer, SUM(Sales) as [Total Sales]
Resident Temp
Group By Customer;
Drop Table Temp;
NoConcatenate
Final:
FIRST 3
Load * Resident Temp2;
Drop Table Temp2;
I have two tables that I am using for the chart... Table 1 contains DEPT and EmployeeID. Table 2 contains EmployeeID and OTHOURS. To get the total OTHOURS, I am calculating (in the dashboard) the SUM(OTHOURS) for each Employee. So, using teh suggested script will not work.
I'd like to rank the top 10 DEPT's by OTHOURS worked. Again, ranking them into a variable in the script to call on that variable in my set analysis. Just not sure how to do it.
Can you provide sample data?
Here is a sample