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
bikelley
Helper IV
Helper IV

¿Por qué no estoy obteniendo valor en KPI sino obteniendo valor en la tabla? (Medida calculada)

Hola

Estoy tratando de calcular los empleados con un positivo Promedio Daily Var % y tengo algunos rangos (De 0 a -10). Quiero saber cuántas personas hay en cada rango en un KPI, pero mi medida está trabajando en una tabla que no está en el KPI. ¿Alguien puede ayudarme a arreglar esto?

Muestra ya que tengo pocas medidas,

https://drive.google.com/file/d/1fWYZNYuLrRSU81fAU2YGzuJA-VF3KiZL/view?usp=sharing

Fórmula -

Positive = COUNTROWS(FILTER(VALUES(Employee[firstlast]),Measures_Unit[Unit_Avg_Daily_Var._in_%] >0))
From 0 to -10% = COALESCE(
                    COUNTROWS(
                        FILTER(
                            VALUES(Employee[firstlast]),
                            (Measures_Unit[Unit_Avg_Daily_Var._in_%] <0.01 && Measures_Unit[Unit_Avg_Daily_Var._in_%] >= -0.1)
                            )),0)

Los datos-

Capture.PNG

Muchas gracias

1 ACCEPTED SOLUTION
v-eqin-msft
Community Support
Community Support

Hola @bikelley ,

Según mi opinión, desea contar valores distintos cuando [medida]>0 , ¿verdad?

Puede utilizar las funciones DISTINCTCOUNT() o DISTINCTCOUNTNOBLANK() para calcular.

po =
CALCULATE (
    DISTINCTCOUNT ( Employee[firstlast] ),
    FILTER ( 'Employee', [Unit_Avg_Daily_Var._in_%] > 0 )
)
from =
CALCULATE (
    DISTINCTCOUNT ( 'Employee'[firstlast] ),
    FILTER (
        'Employee',
        Measures_Unit[Unit_Avg_Daily_Var._in_%] < 0.01
            && Measures_Unit[Unit_Avg_Daily_Var._in_%] >= -0.1
    )
)

Mi salida final se ve así:

11.27.1.1.PNG

Aquí está el archivo pbix.

¿He respondido a tu pregunta? Por favor, marque mi respuesta como solución. Muchas gracias.
Si no es así, cargue algunas muestras de datos insensibles y la salida esperada.

Saludos
Eyelyn Qin

View solution in original post

4 REPLIES 4
v-eqin-msft
Community Support
Community Support

Hola @bikelley ,


¿Podría decirme si su problema ha sido resuelto? Si es así, amablemente Acédárlo como la solución. Más gente se beneficiará de ello. O todavía está confundido al respecto, por favor proporcione más detalles sobre su tabla y su problema o compártame con su archivo pbix de su Onedrive for Business.

Saludos
Eyelyn Qin

v-eqin-msft
Community Support
Community Support

Hola @bikelley ,

Según mi opinión, desea contar valores distintos cuando [medida]>0 , ¿verdad?

Puede utilizar las funciones DISTINCTCOUNT() o DISTINCTCOUNTNOBLANK() para calcular.

po =
CALCULATE (
    DISTINCTCOUNT ( Employee[firstlast] ),
    FILTER ( 'Employee', [Unit_Avg_Daily_Var._in_%] > 0 )
)
from =
CALCULATE (
    DISTINCTCOUNT ( 'Employee'[firstlast] ),
    FILTER (
        'Employee',
        Measures_Unit[Unit_Avg_Daily_Var._in_%] < 0.01
            && Measures_Unit[Unit_Avg_Daily_Var._in_%] >= -0.1
    )
)

Mi salida final se ve así:

11.27.1.1.PNG

Aquí está el archivo pbix.

¿He respondido a tu pregunta? Por favor, marque mi respuesta como solución. Muchas gracias.
Si no es así, cargue algunas muestras de datos insensibles y la salida esperada.

Saludos
Eyelyn Qin

amitchandak
Super User
Super User

@bikelley , Parece bien en la primera mirada. Inténtalo como

De 0 a -10% átablex(VALUES(Empleado[firstlast]) ,(Measures_Unit[Unit_Avg_Daily_Var._in_%] <0.01 && Measures_Unit[Unit_Avg_Daily_Var._in_%] > - 0.1))+0

@amitchandak Muchas gracias, pero estoy llegando a un error. ¿Alguna idea de por qué?
Capture.PNG

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.