Forum Discussion
SEGMENTATION OF DATA WITH FILTERS
Hello, I am trying to get the total practices prescribed by doctor. I have two tables on the one hand all the consultations that the doctor attended and on the other all the practices carried out. I was able to apply a series of measurements and calculations but I can't make the data segmentation work for me.
The practical column Matrix I calculate using two measures the first counts all the columns of a table:
You can use the following measures
Practicas Densitometria 2 = COUNTROWS ( FILTER ( Practicas, Practicas[PRACTICA] = "DENSITOMETRIA" && Practicas[MEDICO] IN VALUES ( 'Atencion en Consultorios'[MEDICO] ) ) )Practicas RX 2 = COUNTROWS ( FILTER ( Practicas, Practicas[PRACTICA] = "RX" && Practicas[MEDICO] IN VALUES ( 'Atencion en Consultorios'[MEDICO] ) ) )Or create a relationship between two tables on MEDICO columns. Then your original measures also work.
Regards,
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.
3 Replies
- amitchandak
Super User
Syndicate_Admin , This approach will work when Practices[Prescriptions] is an independent table
But not very clear what you want
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
- Syndicate_Admin
Administrator
I attach excel file of what I intend to achieve. https://sanatoriolaslomas-my.sharepoint.com/:x:/p/vgalvan/ETsnqwlzo25KgKgUddSvNAkBxtzB2I0x-Fukx7jHxXCrnw?e=xnn5eU
And the pbix so I wouldn't be working https://sanatoriolaslomas-my.sharepoint.com/:u:/p/vgalvan/EdYPc94Rx2JOnbJ2cln4rp8BeMzRzYBMZxM2YIxRthvFvQ?e=6kN3Uh
Thank you!
- v-jingzhang
Community Support
You can use the following measures
Practicas Densitometria 2 = COUNTROWS ( FILTER ( Practicas, Practicas[PRACTICA] = "DENSITOMETRIA" && Practicas[MEDICO] IN VALUES ( 'Atencion en Consultorios'[MEDICO] ) ) )Practicas RX 2 = COUNTROWS ( FILTER ( Practicas, Practicas[PRACTICA] = "RX" && Practicas[MEDICO] IN VALUES ( 'Atencion en Consultorios'[MEDICO] ) ) )Or create a relationship between two tables on MEDICO columns. Then your original measures also work.
Regards,
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.