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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.