Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
PowerBITesting
Helper IV
Helper IV

Conjunto de opciones MultiSelect Filtro D365 con contiene consulta

FILTRO en varias tablas con contiene - No funciona

Count- CALCULATE(
COUNT(activity[createdon]),
FILTER(citas, citas[Filed1] contiene "100") O
FILTER(CONTAINS(phonecall,phonecall[Filed2],"200")OR
FILTER(CONTAINS(tareas,tareas[Filed3],"200")
)
citas, llamadas telefónicas y tareas todas son hijas de La actividad.
y Filed1 ,Filed2 y Filed3 son el conjunto multiopción D365
1 ACCEPTED SOLUTION
v-xuding-msft
Community Support
Community Support

Hola @PowerBITesting ,

Podrías intentarlo así:

Column =
VAR app_id =
    CALCULATE (
        FIRSTNONBLANK ( appointments[ID], 1 ),
        FILTER (
            VALUES ( appointments[Filed1] ),
            SEARCH ( "100", appointments[Filed1],, 999 ) <> 999
        )
    )
VAR pho_id =
    CALCULATE (
        FIRSTNONBLANK ( phonecall[ID], 1 ),
        FILTER (
            VALUES ( phonecall[Filed2] ),
            SEARCH ( "100", phonecall[Filed2],, 999 ) <> 999
        )
    )
VAR task_id =
    CALCULATE (
        FIRSTNONBLANK ( tasks[ID], 1 ),
        FILTER (
            VALUES ( tasks[Filed3] ),
            SEARCH ( "100", tasks[Filed3],, 999 ) <> 999
        )
    )
RETURN
    COUNTROWS (
        FILTER (
            activity,
            activity[app_id] = app_id
                || activity[pho_id] = pho_id
                || activity[task_id] = task_id
        )
    )

v-xuding-msft_0-1597220030730.png

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-xuding-msft
Community Support
Community Support

Hola @PowerBITesting ,

Podrías intentarlo así:

Column =
VAR app_id =
    CALCULATE (
        FIRSTNONBLANK ( appointments[ID], 1 ),
        FILTER (
            VALUES ( appointments[Filed1] ),
            SEARCH ( "100", appointments[Filed1],, 999 ) <> 999
        )
    )
VAR pho_id =
    CALCULATE (
        FIRSTNONBLANK ( phonecall[ID], 1 ),
        FILTER (
            VALUES ( phonecall[Filed2] ),
            SEARCH ( "100", phonecall[Filed2],, 999 ) <> 999
        )
    )
VAR task_id =
    CALCULATE (
        FIRSTNONBLANK ( tasks[ID], 1 ),
        FILTER (
            VALUES ( tasks[Filed3] ),
            SEARCH ( "100", tasks[Filed3],, 999 ) <> 999
        )
    )
RETURN
    COUNTROWS (
        FILTER (
            activity,
            activity[app_id] = app_id
                || activity[pho_id] = pho_id
                || activity[task_id] = task_id
        )
    )

v-xuding-msft_0-1597220030730.png

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
amitchandak
Super User
Super User

@PowerBITesting , Probar como

Count- CALCULATE(
COUNT(activity[createdon]),
OR(OR(appointments[Filed1] contains "100") , CONTAINS(phonecall[Filed2],"200") , CONTAINS(tasks[Filed3],"200"))
)

lbendlin
Super User
Super User

DAX utiliza el uso de la estación de para la lógica "o" y && para la lógica "y".

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.