Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Tell us which business and trade publications you read most regularly: RESPOND NOW
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 - Master III
Partner - Master III

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 - Master III
Partner - Master III

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