Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I read a lot of responses to former questions in the forum, but none of the suggested solutions worked for me.
I have following table:
"Anzahl Patient pro Therapieklasse" is a calculated field:
count(Distinct [Patienten-ID])
Now in the field "Anteil Patienten mit Therapieklasse" I want to divide "Anzahl Patient pro Therapieklasse" by the total value (543). Example: for "Therapieklasse A": 505/543 = 93,00.
The total value of 543 shows the number of all patients.
One patient can have more than one "Therapieklasse". Therefore the total vaule 543 is not equal to the sum of all rows.
As suggested in other forum entries I already tried to use this experssion:
(sum(count(Distinct [Patienten-ID]))) / (sum(TOTAL <Therapieklasse> (count(Distinct [Patienten-ID]))))
but it doesn't work.
Can you please tell me what I made wrong or which expression I should use?
Thank you in advance!
Best regards,
Diana
Hi Diana,
Try like below
Assign the variable with the formula like below
vNoOfPatients = count(Distinct [Patienten-ID])
If we use equal assign, it calculates the formula and will store 543 in the vNoOfPatients
in the chat, try like below
= count(Distinct [Patienten-ID]) / vNoOfPatients
Hope it helps.
Else, pls attach the sample file
Hi Diana,
Try like below
Assign the variable with the formula like below
vNoOfPatients = count(Distinct [Patienten-ID])
If we use equal assign, it calculates the formula and will store 543 in the vNoOfPatients
in the chat, try like below
= count(Distinct [Patienten-ID]) / vNoOfPatients
Hope it helps.
Else, pls attach the sample file
Try like this
count(Distinct [Patienten-ID]) /count(Distinct TOTAL [Patienten-ID])
Yes, it helped 🙂
The values are exactly wthat I wanted them to be.
Thanks a lot!