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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
qliklizzy
Creator II
Creator II

Divide an expression by the total of the expression

Hi

i have an expression called Extra which diplays a count of the difference between beds used and allocated by specialty

i need to be able to divide the extra for each specialty by the total extra to work out the probability for each specialty.

which i though i could just do [Extra] / sum([Extra] but this does not work.

in excel i have the workings below

I have left the formula in C26 to show the proability workings needed

once this is calculated i need to work out how many beds to allocate based on the specialties probabilty.

the formula is the same for each specialty apart from ELM - the if statement refers to 1/3 rather than 1/6

is this doable in an expession ?

thanks liz

   

24ABCD
25SpecExtra numberProbabilty allocate
26CARD5C26/$C$31IF(B26>="1/6",0,((1/6-B26)*A32))
27DIAB/ENDOC-44/9 IF(C27>=1/6,0,((1/6-C27)*C31))
28ELM91      IF(C28>=1/3,0,((1/3-C28)*C31))
29GASTRO-11/9 IF(C29>=1/6,0,((1/6-C29)*C31))
30RESPMED00      IF(C30>=1/6,0,((1/6-C30)*C31))
31Total9
21 Replies
sunny_talwar

Not sure I understand this

also the allocate doesnt display minus beds ? just 0

Look the attached for removing specs

qliklizzy
Creator II
Creator II
Author

i think it might be ok, not to show any minus beds as you cannot allocate a bed thats not there.

thanks you very much i will take a look at removing the specs.

you have been extremely helpful and very knowledegable - thank you