Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
jamesmf1982
Contributor III
Contributor III

Returning values for an employee at their primary location

Hi everyone, 

Wow it seems like an age since my last post in here! Not because I became amazing, but that I changed jobs... But now I'm back! I've got  a question about returning unique values against an employees site.

The setup I have is many employees with unique IDs that can be shared across multiple locations (EmployeeBranch), however they have a main branch (EmployeeMainBranch). What I would like to do is calculate a sum on the hours (HoursDuration) against only the main branch.

I know it should be a fairly simple expression but I am stuck I'm afraid.

Any help would be great!

Thanks

James

5 Replies
Vegar
MVP
MVP

I'll try to help, but please have me excused if I didn't understand your problem correctly.

Assuming you have a object with Employee, Branch, MainBranch and sum of HourDuration. 

Try an expression like this:

Sum(TOTAL <Employee, MainBranch> HourDuration) 

jamesmf1982
Contributor III
Contributor III
Author

Hi there, 

Thanks for this, I'll give it a go and see what happens 🙂

Vegar
MVP
MVP

If it doesn't work then you could add images  to this thread to better describe what you are trying to do. 

edwin
Master II
Master II

if what you need is the total only for the main branch just add set analysis

{<Branch={'EmployeeMainBranch'}>}

where branch is the field and EmployeeMainBranch is the value identifying the main branch.

but perhaps the requirement isnt as simple as that so maybe you can articultate it further or as Vegar suggested an attachment or sample data would help

jamesmf1982
Contributor III
Contributor III
Author

Hi All, Thanks for all your responses. In the end our guy put something in to highlight where the main branch was.