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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
martin_hamilton
Creator
Creator

Divide one expression from another?!

I have a straight table with multuple columns which have expression associated with them e.g.

Column 2

Sum([Working Days]) - sum({<Task={'Personal Holiday', 'Sickness', 'Contractor Leave'}>} Days)

Column 3

=sum({<[Working Day]={'Yes'}>} Days)

In column 1 I wish to show the results of Column 3 divided by Column 2. I have performed a workaround by including the following:

=Column(3) / Column (2)

But I wish to utilise the calculation else where in other charts so this wont work. is there a way of doing this with sum of expression within a wide expression?

The result would be a % 

I tried the following but am returning the incorrect results:

=sum({<[Working Day]={'Yes'}>} Days)/Sum([Working Days]) / sum({<Task={'Personal Holiday', 'Sickness', 'Contractor Leave'}>} Days)

 

Thanks

Martin

 

 

Labels (2)
1 Solution

Accepted Solutions
agigliotti
Partner - Champion
Partner - Champion

maybe this:
=sum( {< [Working Day] = {'Yes'} >} Days )
/
(
Sum( [Working Days] ) - sum( {< Task = {'Personal Holiday', 'Sickness', 'Contractor Leave'} >} Days )
)
-1

the result will be a percentage %.

View solution in original post

2 Replies
agigliotti
Partner - Champion
Partner - Champion

maybe this:
=sum( {< [Working Day] = {'Yes'} >} Days )
/
(
Sum( [Working Days] ) - sum( {< Task = {'Personal Holiday', 'Sickness', 'Contractor Leave'} >} Days )
)
-1

the result will be a percentage %.

martin_hamilton
Creator
Creator
Author

many thanks this worked perfectly. only amendment i made was the removal of the -1 as the column i inserted within was a measure. 

 

thanks

Martin