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

LA FUNCIÓN DE CONMUTACIÓN FUNCIONA PARA ALGUNAS CATEGORÍAS, PERO NO PARA TODAS

Buenas noches comunidad,

La función de conmutación no funciona para todas las categorías. ¿Qué me estoy perdiendo? ¿Debo usar la columna Rango? Cualquier ayuda es muy apreciada. Por favor, vea lo siguiente:

KPI = INTERRUPTOR(

VERDADERO(),
'Contar'[Umbral] = "CUALQUIERA" && 'Contar'[Promedio] > 60, "0",
'Contar'[Umbral] = <$50M && 'Contar'[Promedio] > 135, "0",
'Contar'[Umbral] = ">$50M" && 'Contar'[Promedio] > 240, "0",
'Contar'[Umbral] = < 250.000 dólares && 'Contar'[Promedio] > 30, "0",
'Contar'[Umbral] = ">$250k pero NTE $7M" && 'Contar''[Promedio] > 45, "0",
'Contar''[Umbral] = ">$7M" && 'Contar'[Promedio] > 60, "0",
'Contar'[Umbral] = <$250k && 'Contar'[Promedio] > 35, "0",
'Contar'[Umbral] = ">$250k pero NTE $7M" && 'Contar'[Promedio] > 60, "0",
'Contar'[Umbral] = ">$7M" && 'Contar'[Promedio] > 120, "0",
"1")

Promedios de (74, 20 y 31) KPI s/b "1"...

KPI promedio del rango de categoría

chudson002_1-1656991295571.png

3 REPLIES 3
Syndicate_Admin
Administrator
Administrator

@chudson002 ,

Intente usar SUM('Count'[Average]) en su lugar.
SI es una medida, use SUMX ('Count', 'Count'[Average]).

Pruebe también la función IF().

KPI =
IF (
    ( 'Count'[Threshold] = "ANY"
        && 'Count'[Average] > 60 )
        || ( 'Count'[Threshold] = "<$50M"
        && 'Count'[Average] > 135 )
        || ( 'Count'[Threshold] = ">$50M"
        && 'Count'[Average] > 240 )
        || ( 'Count'[Threshold] = "<$250,000"
        && 'Count'[Average] > 30 )
        || ( 'Count'[Threshold] = ">$250k but NTE $7M"
        && 'Count'[Average] > 45 )
        || ( 'Count'[Threshold] = ">$7M"
        && 'Count'[Average] > 60 )
        || ( 'Count'[Threshold] = "<$250k"
        && 'Count'[Average] > 35 )
        || ( 'Count'[Threshold] = ">$250k but NTE $7M"
        && 'Count'[Average] > 60 )
        || ( 'Count'[Threshold] = ">$7M"
        && 'Count'[Average] > 120 ),
    "0",
    "1"
)

Si sigue sin funcionar, por favor comparta el pbix.

Saludos

Arrendajo

Syndicate_Admin
Administrator
Administrator

@chudson002 , Asegúrese de manejar rangos superpuestos

, por favor verifique en negrita

KPI = INTERRUPTOR(
VERDADERO(),
'Count'[Threshold] = "ANY" && 'Count'[Average] > 60, "0",
'Count'[Threshold] = "<$50M" && 'Count'[Average] > 135, "0",
'Count'[Threshold] = ">$50M" && 'Count'[Average] > 240, "0",
'Count'[Threshold] = "<$250,000" && 'Count'[Average] > 30 && 'Count'[Average] < 60, "0",
'Count'[Threshold] = ">$250k but NTE $7M" && 'Count'[Average] > 45, "0",
'Count'[Threshold] = ">$7M" && 'Count'[Average] > 60 && 'Count'[Average] < 120, "0",
'Count'[Threshold] = "<$250k" && 'Count'[Average] > 35, "0",
'Count'[Threshold] = ">$250k but NTE $7M" && 'Count'[Average] > 60, "0",
'Count'[Threshold] = ">$7M" && 'Count'[Average] > 120, "0",
"1")

Buenos días

Revisados por recomendación, los indicadores no se actualizaron.

¿Alguna sugerencia?

V/R

chudson002

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.