Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help with total function

I have created a chart which basically has the following values

DateCustomerTime% Time Spent
26/08/2013Epicor6:30%100
27/08/2013Epicor4:00%53
27/08/2013RB3:30%47
28/09/2013Dixon1:00%11
28/09/2013Epicor2:00%22
28/09/2013RB5:30%67

The expression for the total time is:

     sum(EndDateTime - StartDateTime) / sum(TOTAL <Date> EndDateTime - StartDateTime)

Which works fine when nothing is selected.

As soon as I select a customer, the percentages changes to be %100.  I assume this is because the expression is going off what is I selected.

How can I change the expression, so the TOTAL figures is the total time spent on each day, irrespective of what has been selected.

Thanks

Andy

I have added the dashboard and the excel file

1 Solution

Accepted Solutions
whiteline
Master II
Master II

Hi.

With set analysis you can modify user selections that is used for expression.

For example to discard customer selection:

sum({<Customer=>}TOTAL <Date> EndDateTime - StartDateTime)

View solution in original post

6 Replies
Anonymous
Not applicable
Author

Hi Andy,

Would you care to attach your QVW file?

Cheers,

Antoine

whiteline
Master II
Master II

Hi.

With set analysis you can modify user selections that is used for expression.

For example to discard customer selection:

sum({<Customer=>}TOTAL <Date> EndDateTime - StartDateTime)

israrkhan
Specialist II
Specialist II

hi Fearn:

try Below Expression, May This Help:

=sum({1<EndDateTime - StartDateTime>}) / sum({1<TOTAL <Date> EndDateTime - StartDateTime>})




Khan

Not applicable
Author

Thank you for helping but your expression I couldn't get your expression to work

Not applicable
Author

Hi

That worked.

Thanks

Andy

MK_QSL
MVP
MVP

=sum({1}EndDateTime-StartDateTime)/sum({1}TOTAL <Date> EndDateTime-StartDateTime)