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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Assistance with an Expression

Hi

I have a set of data where we have log in times for people each day, and a seperate record of their contracted hours.

Example

                    LoggedIn

01/07/15         503

02/07/15         503

03/07/15         512

04/07/15         200

04/07/15         275

Contracted Hours per day 510

I want to find the % of logged in against the contracted hours, but we have instance where agents log out and back in during the same day (e.g. 04/07/15 data above)

S I want to divide the logged in by the contracted hours per day, but take into account where there may be more than one instance of the same date and therefore still only have a contracted hours of 510 per day.

The expression I have at the moment is

=num(sum(LoggedIn) / count(distinct(date)*ContractedHours*100,'##.##')

This however is not returning the result I expect. If I filter to the  01/07/15 I'm getting 34.98 and not the 98 or 99 that I should be expecting.

Do I need to break up the expression in a different way?

Many thanks in advance

2 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

See attached qvw.


talk is cheap, supply exceeds demand
robert_mika
Master III
Master III

tRY:

=aggr(sum(LoggedIn),dATE)/510*100

24-Jul-15 11-02-11 AM.jpg