Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
sarfaraz_sheikh
Contributor III
Contributor III

How to populate category based on Max(AssignmentDate)

Dear Folks,

Below is my table and i have to show the "employee category name" instead of LEI_Assignemnet_End_date. I  have successfully calculated the max assignment date but i want to show the employe category name of max assignment date in chart.

Can anyone please help me how to to bring it on chart level. data and QVW is also attached here for your reference.

Note : we have to do it on front end only because there are too many complex rotations and calculation

implemented in backend.

Snap3.png

Example1

Snap1.png

In above example it should show confirmed staff only as a employee category because it has max assignment end date. other record should get suppressed.

Exmaple 2:

Snap2.png

In this example we should get only highest record based on assignement end date only but it should populate "Resigned " as employee category in chart.

hicgwassenaar‌  please comment

Hope above clarify the requirement. and help would be much appreciated.

Thanks

Sarfaraz

7 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

Try this.

Keep Employee as dimension and below expression for category

If( FirstSortedValue([Employee Category],-LEI_Assignment_End_Date)='-','Resigned',FirstSortedValue([Employee Category],-LEI_Assignment_End_Date))

See attached file for more understanding.

Regards,

Kaushik Solanki

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

Thanks Kaushik for your reply. 

But if i put Lei_Assignment_date as dimension then all the assignment end date is coming however we want only max assignment date should get populate infronnt of Employee Category.

Incorrect

Snap5.png

Corrcet One should be like this .

Snap4.png

Thanks

sarfaraz

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

It is because you have also added the End date in dimension.

Remove that and you will get what you want.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

To get the End Date use another expression i.e Max(EndDate)

Regards,

Kaushik Solanki

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

Hello Kaushik,  Thanks again for your help ....However we have multiple fields included in same pivot table and Max(end date) is giving me values but how we can suppress the record which we do not want in expression column.

Kindly correct me if i am wrong.

Below is the expression i made for max values

Only({<LEI_Assignment_End_Date={"$(=Aggr(Max(LEI_Assignment_End_Date),[Employee No]))"}>}

If(IsNull([Employee Category]) or Len(Trim([Employee Category]))=0 or WildMatch([Employee Category],'*-*'),'Resigned',[Employee Category]))


snap6.png

When i selected then it is showing me the correct value when i deselect then nothing is appearing ...can you please help with expression.


Thanks

Sarfaraz

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

Try maxstring instead of only.

Regards,

Kaushik Solanki

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

Tried MaxString, concat etc but it same result ....when deselect everything getting null

Thanks

Sarfaraz