Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
sharankv
Contributor
Contributor

Help in removing the records

Hi Experts,

Please help me in filtering the records from the below table. The table has a field named as "Assignment End Date". In the below table, there are five records coming up by adding all the dimensions in the chart with "1" as expression value. I need the table to be turned to just 2 records which are the ones with the maximum Assignment End Date

Please provide me with accurate and quick solution.

   

Employee NumberEmployee NameFunctionProfit CentrePositionTermination DateTerminationsEmployeeData.EmpCategoryAssignment End DateLast Update Date=1
19528Vig, MintyAuditAudit-BusinessAnalyst26-May-2014Confirmed Staff30-Sep-201108-Jul-20141
19528Vig, MintyAuditAudit-BusinessAnalyst26-May-2014Secondee-Outward-Without Pay05-May-201308-Jul-20141
19528Vig, MintyAuditAudit-BusinessSenior Audit Associate26-May-2014Secondee-Outward-Without Pay30-Sep-201308-Jul-20141
19528Vig, MintyJV-AuditKRC-Audit-AsstKRC-Audit-Asst.Analyst26-May-2014Confirmed Staff26-May-201416-Jan-20151
19528Vig, MintyJV-AuditKRC-Audit-AsstKRC-Audit-Asst.Audit Assistant26-May-2014Confirmed Staff26-May-201416-Jan-20151

@

6 Replies
tresesco
MVP
MVP

Maximum for every Function? If so, try like:

Dimensions : Emp No, Emp Name, Function

Exp:

FirstSortedValue(ProfictCentre, -[Assignment End Date])

FirstSortedValue(Position, -[Assignment End Date])

...


for all the rest fields..

sharankv
Contributor
Contributor
Author

Hi Tresesco,

The above solution seems not working.. Can you please post a .qvw app fulfilling the requirement with the data above.

It would be of great help to me.

Regards

Sharan

tresesco
MVP
MVP

Help me by sharing your qvw where you tried the solution I suggested and let me work on that.

sharankv
Contributor
Contributor
Author

Hi Tresesco,

Attached the QVW in the original post.

Please find it.

Thanks

Sharan

tresesco
MVP
MVP

Your date field is a text field. That is why it was not working. I have used an alternative solution using date#(). PFA

Capture.JPG

Anonymous
Not applicable

Sharan,

Add the below code

LOAD [Employee Number],
[Employee Name],
Function,
[Profit Centre],
Position,
[Termination Date],
TerminationsEmployeeData.EmpCategory,
[Assignment End Date],
[Last Update Date]
FROM
[..\Community001.xlsx]
(
ooxml, embedded labels, table is Sheet1);
Left Join (Sheet1)
load max([Assignment End Date]) AS Maxdate, [Employee Number] Resident Sheet1 Group By [Employee Number]

then create a straight table with all the dimensions  and give expression as

=if([Assignment End Date]=Maxdate, 1)