I have two tables:
Patients has unique idPatient
UPDRS has scores (multiple per patient) and is linked to Patients via idPatient
Here's my one-to-many relationship:
By everything I've read here and elsewhere this seems to be the right way to do it.
However, the simplest visual I could think of just shows the total number of patients for every option. I did a New Measure to count the number of patients.
Then I created a table visual with intQ18 (possible answers of 0 through 4) and that Measure. Since it didn't work I also tried letting PowerBI do a distinct count.
As an example: idPatient 1625 scored a 1, 2, and 4 at different times and should be counted in those buckets and not the other ones.
Things I have tried:
Your help is much appreciated.
Solved! Go to Solution.
@parry2k Seems to have worked!
So the short version is "do your counting in the table that has 'many' IDs, not in the table that has 'one' ID". Is that correct? Is it only true for if the thing you are "grouping by" like my intQ18 is in the 'many' table?
@cjacobson it depends what you are trying to do, if you have using column from many side then your calculation should be on many side column, in this case you are counting by column from many side which cannot filter patient table, although that can be achieved by cross filter direction set to both.
So there are many option, it all depends what you are trying to achieve and how you set up you data model.
Check out the November 2023 Power BI update to learn about new features.
Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.
130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.