Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys
I want to add up percentages as seen below but when I go to add I'm getting the decimal point rather than percentage if that makes sense.
So for example instead of returning 9.18% (total of both) it is returning 0.918.
I know it probably the code I need to change?
Any Ideas
Thanks Martin
Is it giving you 0.918 or 0.0918? Because a decimal representation of 9.18% will be 0.0918. If this is what you see, then all you need is a Num function around your expression
Num(Expression, '#.##%')
Hi Sunny apologies I never included the below, Im still getting the decimal point
=Num((count(if (SelfHarmAct_ID= '1' and SubstanceMisuseAlsoAFactor = '1', NEWKEYID))-Count(if (SelfHarmAct_ID = '1' and SubstanceMisuseAlsoAFactor= '1', PatientsNotAssessed_ID)))/(Count(NEWKEYID)-Count(PatientsNotAssessed_ID)),'##.##%')
+Num((count(if (SelfHarmAct_ID= '2' and SubstanceMisuseAlsoAFactor = '1', NEWKEYID))-Count(if (SelfHarmAct_ID = '2' and SubstanceMisuseAlsoAFactor= '1', PatientsNotAssessed_ID)))/(Count(NEWKEYID)-Count(PatientsNotAssessed_ID)),'##.##%')
Try this
=Num(
((Count({<SelfHarmAct_ID = {'1'}, SubstanceMisuseAlsoAFactor = {'1'}>} NEWKEYID) - Count({<SelfHarmAct_ID = {'1'}, SubstanceMisuseAlsoAFactor = {'1'}>} PatientsNotAssessed_ID))/(Count(NEWKEYID) - Count(PatientsNotAssessed_ID))
+
(Count({<SelfHarmAct_ID = {'2'}, SubstanceMisuseAlsoAFactor = {'1'}>} NEWKEYID) - Count({<SelfHarmAct_ID = {'2'}, SubstanceMisuseAlsoAFactor = {'1'}>} PatientsNotAssessed_ID))/(Count(NEWKEYID) - Count(PatientsNotAssessed_ID)))
,'##.##%')
Sunny what can I say,
Brilliant that's working!
Martin
Awesome ![]()
Sunny apologies If I was to add another line as below, am I wrong with my brackets?
=Num(
((Count({<SelfHarmAct_ID = {'1'}, SubstanceMisuseAlsoAFactor = {'1'}>} NEWKEYID) - Count({<SelfHarmAct_ID = {'1'}, SubstanceMisuseAlsoAFactor = {'1'}>} PatientsNotAssessed_ID))/(Count(NEWKEYID) - Count(PatientsNotAssessed_ID))
+
(Count({<SelfHarmAct_ID = {'2'}, SubstanceMisuseAlsoAFactor = {'1'}>} NEWKEYID) - Count({<SelfHarmAct_ID = {'2'}, SubstanceMisuseAlsoAFactor = {'1'}>} PatientsNotAssessed_ID))/(Count(NEWKEYID) - Count(PatientsNotAssessed_ID)))
+
(Count({<SelfHarmAct_ID = {'2'}, SubstanceMisuseAlsoAFactor = {'1'}>} NEWKEYID) - Count({<SelfHarmAct_ID = {'2'}, SubstanceMisuseAlsoAFactor = {'1'}>} PatientsNotAssessed_ID))/(Count(NEWKEYID) - Count(PatientsNotAssessed_ID)))
,'##.##%')
Yes... try this
=Num(
(
(Count({<SelfHarmAct_ID = {'1'}, SubstanceMisuseAlsoAFactor = {'1'}>} NEWKEYID) - Count({<SelfHarmAct_ID = {'1'}, SubstanceMisuseAlsoAFactor = {'1'}>} PatientsNotAssessed_ID))/(Count(NEWKEYID) - Count(PatientsNotAssessed_ID))
+
(Count({<SelfHarmAct_ID = {'2'}, SubstanceMisuseAlsoAFactor = {'1'}>} NEWKEYID) - Count({<SelfHarmAct_ID = {'2'}, SubstanceMisuseAlsoAFactor = {'1'}>} PatientsNotAssessed_ID))/(Count(NEWKEYID) - Count(PatientsNotAssessed_ID))
+
(Count({<SelfHarmAct_ID = {'2'}, SubstanceMisuseAlsoAFactor = {'1'}>} NEWKEYID) - Count({<SelfHarmAct_ID = {'2'}, SubstanceMisuseAlsoAFactor = {'1'}>} PatientsNotAssessed_ID))/(Count(NEWKEYID) - Count(PatientsNotAssessed_ID))
)
,'##.##%')