Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Icon for Administrator rankAdministrator
5 years ago
Solved

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 ...
  • v-jingzhang's avatar
    5 years ago

    Hi Syndicate_Admin 

     

    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.