Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
sweens78
Creator
Creator

error in % expression

Hi Folks

I seem to have problem with the % I have the below but its giving me a massive percentage any ideas, I think its my brackets again. I just want to add the two values together and then divide those into another number displaying the %

num((Count({<SelfHarmAct_ID={'10'}>} NEWKEYID)-Count({<SelfHarmAct_ID={'10'}>} PatientsNotAssessed_ID))

+

(Count({<SelfHarmAct_ID={'9'}>} NEWKEYID)-Count({<SelfHarmAct_ID={'9'}>} PatientsNotAssessed_ID))

 

/ (Count(NEWKEYID)-Count(PatientsNotAssessed_ID)),'##.##%')

1 Solution

Accepted Solutions
stigchel
Partner - Master
Partner - Master

I guess brackets and why not combine the two ID's, like

=num((Count({<SelfHarmAct_ID={'9','10'}>} NEWKEYID)-Count({<SelfHarmAct_ID={'9','10'}>} PatientsNotAssessed_ID))
/ (Count(NEWKEYID)-Count(PatientsNotAssessed_ID)),'##.##%')

View solution in original post

3 Replies
jfkinspari
Partner - Specialist
Partner - Specialist

You do seem to be missing a pair of brackets before you divide


num(

(

(Count({<SelfHarmAct_ID={'10'}>} NEWKEYID)-Count({<SelfHarmAct_ID={'10'}>} PatientsNotAssessed_ID))
+
(Count({<SelfHarmAct_ID={'9'}>} NEWKEYID)-Count({<SelfHarmAct_ID={'9'}>} PatientsNotAssessed_ID))
)
/ (Count(NEWKEYID)-Count(PatientsNotAssessed_ID))

,'##.##%')

stigchel
Partner - Master
Partner - Master

I guess brackets and why not combine the two ID's, like

=num((Count({<SelfHarmAct_ID={'9','10'}>} NEWKEYID)-Count({<SelfHarmAct_ID={'9','10'}>} PatientsNotAssessed_ID))
/ (Count(NEWKEYID)-Count(PatientsNotAssessed_ID)),'##.##%')
sweens78
Creator
Creator
Author

still seem to be be getting error jfkinspari

=(
num((Count({<SelfHarmAct_ID={'10'}>} NEWKEYID)-Count({<SelfHarmAct_ID={'10'}>} PatientsNotAssessed_ID))
+
(Count({<SelfHarmAct_ID={'9'}>} NEWKEYID)-Count({<SelfHarmAct_ID={'9'}>} PatientsNotAssessed_ID))
)
/ (Count(NEWKEYID)-Count(PatientsNotAssessed_ID)),'##.##%')