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

Ayuda de IF OR Dax

Hola a todos

Necesito ayuda para diseñar debajo de dax. Esto estoy tratando de hacer, ¿alguien puede ayudar en esto?

HorasA =
IF(OR( Activo[Mes]=11, Activo[Mes]=12),
IF( Activo[Estado activo]=1,
IF('Activo'[Centro]="Mamá",480*'Activo'[Prod],450*'Activo'[Prod]),

IF(OR( Activo[Mes] distinto de 11 y 12 meses) entonces
IF( Active[Active Status]=1, IF('Active'[Center]="Mum",465*'Active'[Prod],435*'Active'[Prod]),0)
)))

1 ACCEPTED SOLUTION
Syndicate_Admin
Administrator
Administrator

Hay @PowerBIBeginer

Difícil saber qué condiciones realmente querías, deriqué esta.

HoursA =
IF (
    OR ( Active[Month] = 11, Active[Month] = 12 ),
    IF (
        Active[Active Status] = 1,
        IF ( 'Active'[Center] = "Mum", 480 * 'Active'[Prod], 450 * 'Active'[Prod] ),
        0
    ),
    -- Active[Month] other than 11 and 12 month
    IF (
        Active[Active Status] = 1,
        IF ( 'Active'[Center] = "Mum", 465 * 'Active'[Prod], 435 * 'Active'[Prod] ),
        0
    )
)

View solution in original post

3 REPLIES 3
Syndicate_Admin
Administrator
Administrator

Hay @PowerBIBeginer

Difícil saber qué condiciones realmente querías, deriqué esta.

HoursA =
IF (
    OR ( Active[Month] = 11, Active[Month] = 12 ),
    IF (
        Active[Active Status] = 1,
        IF ( 'Active'[Center] = "Mum", 480 * 'Active'[Prod], 450 * 'Active'[Prod] ),
        0
    ),
    -- Active[Month] other than 11 and 12 month
    IF (
        Active[Active Status] = 1,
        IF ( 'Active'[Center] = "Mum", 465 * 'Active'[Prod], 435 * 'Active'[Prod] ),
        0
    )
)

Hola superusuario, Gracias por tu pronta respuesta. lo que estoy tratando de hacer es, si mes = 11 o 12 (11 es noviembre y 12 es diciembre), entonces la línea inferior debería funcionar-

Activo[Estado activo] = 1, SI ( 'Activo'[Centro] = "Mamá", 480 * 'Activo'[Prod], 450 * 'Activo'[Prod] ),

de lo contrario, si el mes es distinto de 11 o 12 (es decir, 1 o 2 o 3 / 4 / 5 / 6 /7 / 8 / 9 / 10) significa desde enero hasta octubre y luego por debajo del trabajo de código.

Activo[Estado activo] = 1, SI ( 'Activo'[Centro] = "Mamá", 465 * 'Activo'[Prod], 435 * 'Activo'[Prod] ),

Estoy obteniendo valores para los meses 11 o 12 correctamente, pero para otras polillas estoy obteniendo 0.

Hola hola mwegener (superusuario), tienes razón. tu solución es correcta, solo tienes eso que me has dado. Bien. Muchas gracias..

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.