Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
jamesmf1982
Contributor III
Contributor III

Returning number of employees over their total hours

Hi All,

The question I have is in relation to returning the number of employees where the hours totalled are greater than 72.

Currently this returns as a chart fine using the below:

=if($(v_exp_planned_hours_employee)>72,$(v_exp_planned_hours_employee),0)

When using employee_code as a dimension and v_exp_planned_hours is a variable to get

How could this be converted to just return the number of employees that have hours greater than 72?

Many thanks!

James

8 Replies
sunny_talwar

May be this

Sum(Aggr(if($(v_exp_planned_hours_employee)>72,$(v_exp_planned_hours_employee),0), employee_code))

sunny_talwar

or try this

Count(DISTINCT {<employee_code = {"=$(v_exp_planned_hours_employee)>72"}>} employee_code)

jamesmf1982
Contributor III
Contributor III
Author

Hi,

I tried both of these but they didn't work. I had 0 returned for the first

expression, and Error for the second. However If I were to use the second

example would i need to change any of the formatting, e.g the quotes, if I

were to use it in the Text to Chart?

Regards

James MacDonald-Fawcett

Applications Manager

Crown House

Stephenson Road

Colchester

Essex.

CO4 9QR

Email: James.MacDonald-Fawcett@mearsgroup.co.uk

Tel: 0333 4343149

Mob: 07793515128

Web: http://www.mearsgroup.co.uk

sunny_talwar

How is v_exp_planned_hours_employee defined?

jamesmf1982
Contributor III
Contributor III
Author

Sorry I am not sure what you mean by this?

This email and all information contained within it, is confidential and intended solely for the use of the individual, or entity, to whom it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any use, copying, dissemination or disclosure of this information is strictly prohibited.

If you have received this email in error then please notify the sender in the first instance, so that our records can be amended and please delete the original from your system.

While Mears Group PLC has taken every reasonable precaution to minimise the risk of this email and any attachments containing computer viruses, we advise that any attachments should be scanned by a reputable and up to date anti-virus tool before they are opened.

For any email error related queries please contact us at postmaster@ mearsgroup.co.uk

Any view or opinions within this email are solely those of the author and do not necessarily represent those of Mears Group PLC and its subsidiaries.

Mears Group PLC. Registered office: 1390 Montpellier Court, Gloucester Business Park, Brockworth, Gloucester GL3 4AH

Registered number: 3232863. Country of registration: England and Wales

sunny_talwar

My guess is that v_exp_planned_hours_employee  is a variable, right? What is the expression behind this variable?

jamesmf1982
Contributor III
Contributor III
Author

Thanks. Here you go.

'sum({<VisitStartDate=

{">='&'$'&'(='&'$'&'(v_date_min))<='&'$'&'(='&'$'&'(v_date_max))"} ,VisitInvoiceStatus

-= {''Cancelled Visit'',''N/A''}>} VisitOriginalVisitQuantity)';

This email and all information contained within it, is confidential and intended solely for the use of the individual, or entity, to whom it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any use, copying, dissemination or disclosure of this information is strictly prohibited.

If you have received this email in error then please notify the sender in the first instance, so that our records can be amended and please delete the original from your system.

While Mears Group PLC has taken every reasonable precaution to minimise the risk of this email and any attachments containing computer viruses, we advise that any attachments should be scanned by a reputable and up to date anti-virus tool before they are opened.

For any email error related queries please contact us at postmaster@ mearsgroup.co.uk

Any view or opinions within this email are solely those of the author and do not necessarily represent those of Mears Group PLC and its subsidiaries.

Mears Group PLC. Registered office: 1390 Montpellier Court, Gloucester Business Park, Brockworth, Gloucester GL3 4AH

Registered number: 3232863. Country of registration: England and Wales

sunny_talwar

You seem to have made your expression much more complex then it might be needed to be. Would you be able to share a sample to look at this?