Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Icon for Administrator rankAdministrator
11 months ago
Solved

SEARCH IN A DATE RANGE

Good afternoon

I need help with a crossover, I have 2 Tables PROCESS TABLE, INCOME TABLE

In the income table I have the people who joined a certain company

and the second table is the process table, in the latter it shows the process time of each person and is within a date range, what I need is to create a column that tells me that the person did enter within the process taking into account the COD PERSON and that the ENTRY DATE of the entry table is within the date range of the Process table.

I am very grateful in advance for the support with this case.

Best regards.

  • Hi Syndicate_Admin 

    Try this:

    Ingreso? = 
    VAR _person = Procesos[COD_PERSON]
    VAR _count =
        COUNTROWS (
            FILTER (
                Ingreso,
                Ingreso[FECHA_DE_INGRESO] <= Procesos[Fecha_FIN_TOL]
                    && Ingreso[FECHA_DE_INGRESO] >= Procesos[Fecha_INI_TOL]
            )
        )
    RETURN
        IF ( NOT ( ISBLANK ( _count ) ), "si", "no" )
    

     

5 Replies

  • Hi Syndicate_Admin 

    Try this:

    Ingreso? = 
    VAR _person = Procesos[COD_PERSON]
    VAR _count =
        COUNTROWS (
            FILTER (
                Ingreso,
                Ingreso[FECHA_DE_INGRESO] <= Procesos[Fecha_FIN_TOL]
                    && Ingreso[FECHA_DE_INGRESO] >= Procesos[Fecha_INI_TOL]
            )
        )
    RETURN
        IF ( NOT ( ISBLANK ( _count ) ), "si", "no" )
    

     

  • Syndicate_Admin 

    EnteredDuringProcess =
    VAR CurrentPerson = 'INCOME TABLE'[COD_PERSONA]
    VAR EntryDate = 'INCOME TABLE'[FECHA_INGRESO]

    RETURN
    IF (
    CALCULATE (
    COUNTROWS ( 'PROCESS TABLE' ),
    FILTER (
    'PROCESS TABLE',
    'PROCESS TABLE'[COD_PERSONA] = CurrentPerson &&
    EntryDate >= 'PROCESS TABLE'[START_DATE] &&
    EntryDate <= 'PROCESS TABLE'[END_DATE]
    )
    ) > 0,
    "Yes",
    "No"
    )

  • try this

    Ingres = 
    VAR _count =
        SUMX( 
            FILTER (
                Ingreso,
                Ingreso[FECHA_DE_INGRESO] <= Procesos[Fecha_FIN_TOL]
                    && Ingreso[FECHA_DE_INGRESO] >= Procesos[Fecha_INI_TOL]
            ),1)
    RETURN
    IF(_count,"Yes","No")
  • v-prasare's avatar
    v-prasare
    Icon for Community Support rankCommunity Support

    Hi Syndicate_Admin,

    We would like to confirm if our community members answer resolves your query or if you need further help. If you still have any questions or need more support, please feel free to let us know. We are happy to help you.


    Ahmedx, anilgavhane & danextian ,Thanks for your prompt response

     

     

     

    Thank you for your patience and look forward to hearing from you.
    Best Regards,
    Prashanth Are
    MS Fabric community support

  • v-prasare's avatar
    v-prasare
    Icon for Community Support rankCommunity Support

    Hi Syndicate_Admin,

    We would like to confirm if our community members answer resolves your query or if you need further help. If you still have any questions or need more support, please feel free to let us know. We are happy to help you.

     

     

     

     

    Thank you for your patience and look forward to hearing from you.
    Best Regards,
    Prashanth Are
    MS Fabric community support