Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
sweens78
Creator
Creator

To get a percentage of a formula

Hi Guys I have the below formula which is working but Im trying to get the perntage of it any ideas

Correct formula without percentage

count(if(Interventions_ID='4', NEWKEYID))-Count(if( Interventions_ID= '4', PatientsNotAssessed_ID))-(count(if(Interventions_ID='5',NEWKEYID))-Count(if( Interventions_ID= '5', PatientsNotAssessed_ID))),

Here is how Im try to get a percentage by diving it in to ((Count(NEWKEYID)-Count(PatientsNotAssessed_ID)),'##.##%'))

=NUM((count(if(Interventions_ID='4', NEWKEYID))-Count(if( Interventions_ID= '4', PatientsNotAssessed_ID))-(count(if(Interventions_ID='5',NEWKEYID))-Count(if( Interventions_ID= '5', PatientsNotAssessed_ID))) / ((Count(NEWKEYID)-Count(PatientsNotAssessed_ID)),'##.##%'))

1 Solution

Accepted Solutions
Anonymous
Not applicable

after num you see a red bracket, so one bracket is missing

the main Problem is that you Need to use brackets around the subtraction

you use Count x - Count y / Count z (by rules it calculates Count y / Count z and subtracts the result from Count x

you Need (Count x - Count y) / Count z

View solution in original post

2 Replies
Anonymous
Not applicable

after num you see a red bracket, so one bracket is missing

the main Problem is that you Need to use brackets around the subtraction

you use Count x - Count y / Count z (by rules it calculates Count y / Count z and subtracts the result from Count x

you Need (Count x - Count y) / Count z

sweens78
Creator
Creator
Author

Fantastic thanks Mate that worked