Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi,qlikers
i attached some sample data in that i need to find top2 violation employees
how can i find this
Thanks in advanse
Regards
Hemesh
Try this...
=Concat(if(aggr(rank(count({<WorkingFlag={'Voilation'}>}[Employee id])),[Employee id])<=2,[Employee Name]),'|')
Are you trying to do this in the script or UI of the application?
You have to use Rank Function !
May be something like this in the script:
Table:
LOAD [Employee id],
Date,
[Employee Name],
WorkingFlag,
Duration
FROM
EmployeeDatails.xlsx
(ooxml, embedded labels, table is Sheet1);
Temp:
LOAD [Employee id],
Count(WorkingFlag) as Count
Resident Table
Where WorkingFlag = 'Voilation'
Group By [Employee id];
Join(Table)
LOAD [Employee id],
Count,
AutoNumber(Count) as Rank
Resident Temp
Order By Count desc;
DROP Table Temp;
Output in straight table:
in ui i want to find and here the fields are from different tables Employee id,name are from employee table date is from master calendar and duration,workingflag are from final table
Try this...
=Concat(if(aggr(rank(count({<WorkingFlag={'Voilation'}>}[Employee id])),[Employee id])<=2,[Employee Name]),'|')