Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Text Box Expression

Hi,

I am new to QlikView and was wondering if anyone can help with the following text box expression:-

It currently it reads "Highest time spent on Vacation with 186 hours mainly due to JSmith with 186"

What I would like it to read is the end 186 hours by the hours of JSmith which should be 57.5 hours (there actual monthly hours) so the last line of the code would need to be changed from AGS_hours to ??????, (AGE_hours by the AGS_StaffCode

 

='Highest time spent on ' & FirstSortedValue(AGS_Description1,-Aggr(sum({$}AGS_Hours),AGS_Description1))

& ' with ' & sum({<AGS_Description1={'$(=FirstSortedValue(AGS_Description1,-Aggr(sum({$}AGS_Hours),AGS_Description1)))'}>} AGS_Hours)

&' hours mainly due to ' & FirstSortedValue(AGS_StaffCode,-aggr(sum({<AGS_Description1={'$(=FirstSortedValue(AGS_Description1,-Aggr(sum({$}AGS_Hours),AGS_Description1)))'}>} AGS_Hours),AGS_StaffCode))

&' with ' & sum({<AGS_Description1={'$(=FirstSortedValue(AGS_Description1,-Aggr(sum({$}AGS_Hours),AGS_Description1)))'} >} AGS_Hours)

Heres hoping someone can help me,

Thanks Claire

Text Expression Box.bmp

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Instead of your last sum(), try:

max(

aggr(sum({<AGS_Description1={'$(=FirstSortedValue(AGS_Description1,-Aggr(sum({$}AGS_Hours),AGS_Description1)))'}>} AGS_Hours),AGS_StaffCode)

)

View solution in original post

2 Replies
swuehl
MVP
MVP

Instead of your last sum(), try:

max(

aggr(sum({<AGS_Description1={'$(=FirstSortedValue(AGS_Description1,-Aggr(sum({$}AGS_Hours),AGS_Description1)))'}>} AGS_Hours),AGS_StaffCode)

)

Not applicable
Author

Thank you very much it works perfectly