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
Syndicate_Admin
Administrator
Administrator

¿Cómo convertir mi expresión de sólo seleccionar 2 empresa para convertirse en excluir 2 empresa?

Hola a todos

Por debajo de la expresión trabajando bien, porque cuando haga clic en 1 , se mostrará seleccionar sólo 2 empresa :-

FLAG_CUSTOMER = IF ( ISBLANK('Customer'[Customer/Vendor Code]), "0",if('Customer'[Customer/Vendor Code] en {"R10051","F10064"},"1", "0"))
Ahora me gusta modificar la expresión anterior, para que excluya por encima de 2 empresa , intento por debajo de la expresión :-
FLAG_CUSTOMER = IF ( ISBLANK('Customer'[Customer/Vendor Code]), "0",if NOT('Customer'[Customer/Vendor Code] en {"R10051","F10064"},"1", "0"))
Obtego el siguiente error msg :-
La sintaxis de 'NOT' es incorrecta. (DAX(IF ( ISBLANK('Customer'[Customer/Vendor Code]), "0",if NOT('Customer'[Customer/Vendor Code] en {"R10051","F10064"},"1", "0"))).
Paul
Paul
1 ACCEPTED SOLUTION
Syndicate_Admin
Administrator
Administrator

Hola Paul,

Parece un soporte fuera de lugar. Prueba esto:

FLAG_CUSTOMER =
IF (
    ISBLANK ( 'Customer'[Customer/Vendor Code] ),
    "0",
    IF ( NOT 'Customer'[Customer/Vendor Code] IN { "R10051", "F10064" }, "1", "0" )
)

saludos

Owen

View solution in original post

2 REPLIES 2
Syndicate_Admin
Administrator
Administrator

Hola Paul,

Parece un soporte fuera de lugar. Prueba esto:

FLAG_CUSTOMER =
IF (
    ISBLANK ( 'Customer'[Customer/Vendor Code] ),
    "0",
    IF ( NOT 'Customer'[Customer/Vendor Code] IN { "R10051", "F10064" }, "1", "0" )
)

saludos

Owen

@OwenAuger

Muchas gracias, funciona

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.