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
HenryJS
Post Prodigy
Post Prodigy

Medida: En blanco y conteo

Hola a todos

Estoy usando la siguiente medida en una matriz. Me gustaría no mostrar campos que están en blanco en la matriz. También es posible tener un recuento del "Sí" en los subencabezados de fila?

¿Hoja de horas? =
SI (
SELECTEDVALUE ( 'Export Placements'[PlacementStartDate] )
<o MAX ( 'Calendario'[Fecha] )
&& SELECTEDVALUE ( 'Exportar ubicaciones'[PlacementEndDate] )
> MAX ( 'Calendario'[Fecha] ),
SELECTEDVALUE ( 'Falta hojas de horas'[Estado], "" ),
""
)
4 REPLIES 4
v-alq-msft
Community Support
Community Support

Hola, @HenryJS

Si toma la respuesta de alguien, márquela como la solución para ayudar a los otros miembros que tienen los mismos problemas a encontrarlo más rápidamente. Si no, avísame y trataré de ayudarte más. Gracias.

Saludos

Allan

v-alq-msft
Community Support
Community Support

Hola, @HenryJS

Según su descripción, creé datos para reproducir su escenario.

Prueba:

e1.png

Puede crear una medida como la siguiente.

Result = 
var level1 = SELECTEDVALUE(Test[Level 1])
var level2 = SELECTEDVALUE(Test[Level 2])
var level3 = SELECTEDVALUE(Test[Level 3])
var tab = 
SUMMARIZE(
    ALLSELECTED('Test'),
    [Level 1],
    [Level 2],
    [Level 3],
    [Date],
    [Value],
    "Status",
    IF(
        [Value]>10,
        "Yes",BLANK()
    )
)
return

IF(
    ISFILTERED(Test[Date])&&ISFILTERED(Test[Level 1]),
    IF(
        SELECTEDVALUE(Test[Value])>10,
        "Yes",
        BLANK()
    ),
    IF(
        ISFILTERED(Test[Level 1])&&NOT(ISFILTERED(Test[Date])),
        IF(
            ISINSCOPE(Test[Level 3]),
            COUNTROWS(
                    FILTER(
                        tab,
                        [Status] = "Yes"&&
                        [Level 3] = level3
                    )
            ),
            IF(
                ISINSCOPE(Test[Level 2]),
                COUNTROWS(
                    FILTER(
                        tab,
                        [Status] = "Yes"&&
                        [Level 2] = level2
                    )
                ),
                COUNTROWS(
                    FILTER(
                        tab,
                        [Status] = "Yes"&&
                        [Level 1] = level1
                    )
                )
            )
        )
    )   
)

'Mostrar elementos sin datos' está desactivado. Aquí está el resultado.

e2.png

Saludos

Allan

Si este post ayuda,entonces por favor considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.

amitchandak
Super User
Super User

Para la fórmula de cambio en blanco


SI (
SELECTEDVALUE ( 'Export Placements'[PlacementStartDate] )
<o MAX ( 'Calendario'[Fecha] )
&& SELECTEDVALUE ( 'Exportar ubicaciones'[PlacementEndDate] )
> MAX ( 'Calendario'[Fecha] ),
SELECTEDVALUE ( 'Falta hojas de horas'[Estado], "" ),
""
) & ""

Y habilitarShowItemwithoutdata.JPG

Hola @amitchandak

No quiero ver filas sin "Sí" en. También quiero que esto funcione con te date slicer en la parte superior.

Si cambio el "" a BLANK() muestra ahora los datos - por favor vea la última captura de pantalla.

También quiero agregar un subtotal de "Sí" en las filas de encabezado si es posible?

Capture.JPG

Capture1.JPG

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.