Forum Discussion
A matter with DAX functions
Hello everyone,
I face a specific problem. As you can see the "total patients (start of month)" are 1910. Add to those the "new patients in program", who are 48, and then the "total patients (end of month)" are 1958. The problem is that in the last number (1958) the "Drop Outs" number, which is 24, should have been deducted and, thus, it should have been 1934. How can I achieve that? For these numbers I should note that I do not use a specific formula/function but it is just the count of patients for each case from our database.
I would be really grateful if you could help me solve that.
Thanks in advance.
9 Replies
- AllisonKennedy
Community Champion
I'm not sure I understand the question - if you are using cases from the database, then this needs fixed in database. Do you have a DAX measure that calculates "total patients (end of month)" ? If so, please post it here and we can help you update it. If not, please provide name of table and columns and/or measures that you have available in the data model to use for this.- AnonymousNot applicable
Thanks for your interest.
I am just taking the data from the database without having any DAX measures that calculate both of them, including "total patients (end of month)". I use the table "DiseaseGrps" and from there the one titled "Disease Group", which I added on Columns. Moreover, I use the table "Personalized_Compliance" and from there the one titled "PatientID", which I added on Values as "Count of PatientID".
I assume that I will have to create a measure so as to do what I described on my post, is that right?
- AllisonKennedy
Community Champion
What have you put in 'rows' then?
Is "total patients (end of month)" a measure or column in your database? If you can upload screenshots of the Fields pane that might help. 🙂
If they are measures, just do new Measure:
MyPatientCount (end of month) = [Total Patients (End of Month] - [Drop Outs]
Sorry for all the questions, but I'm still a little unclear on what the report looks like.
Thanks!
- amitchandak
Super User
Anonymous , I give a solution some time back. See if that can help
https://community.powerbi.com/t5/Desktop/Churn-Rate-lost-Customer/m-p/1173754#M529196
- AnonymousNot applicable
Hello amitchandak,
Unfortunately it's not the case this time. Could you think about it as well, please?