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

Imagen de tarjeta no filtrada por segmentación de datos

Hola

Creé una muestra de datos utilizando una segmentación de fechas predefinida para mostrar los resultados de hoy / la semana pasada / el mes pasado / último trimestre.

edant_1-1642620452811.png

Creé una medida de bandera que utilicé como filtro en el gráfico visual:

edant_3-1642624448542.png

flag = 
SWITCH (
    MAX ( 'slicer'[slicer] ),
    "Today", IF ( MAX ( 'DateCalendar'[Date] ) = TODAY (), 1 ),
    "Last Week",
        IF (
            DATEDIFF ( MAX ( 'DateCalendar'[Date] ), TODAY (), DAY ) <= 7
                && MAX ( 'DateCalendar'[Date] ) <= TODAY (),
            1
        ),
    "Last Month",
        IF (
            DATEDIFF ( MAX ( 'DateCalendar'[Date] ), TODAY (), DAY ) <= 30
                && MAX ( 'DateCalendar'[Date] ) < TODAY (),
            1
        ),
    "Last Quarter",
        IF (
            DATEDIFF ( MAX ( 'DateCalendar'[Date] ), TODAY (), DAY ) <= 90
                && MAX ( 'DateCalendar'[Date] ) < TODAY (),
            1
        )
)

Ahora, cuando estoy cambiando la segmentación de datos entre el parámetro predefinido (mencionado anteriormente), funcionó perfectamente en el gráfico, pero no en la tarjeta. (No puedo usarlo allí)

Supongo que tiene algo que ver con el hecho de que no hay relación entre la mesa de rebanadora y el resto de las mesas.

edant_2-1642620512158.png

Estoy bastante perdido con este tema.

¿Cómo hago que la rebanadora también funcione en la tarjeta visual? Cuando intento usar el indicador en el visual de la tarjeta, no puedo establecer el valor en "Is = 1". (está bloqueado)

Aquí está el informe para descargar -

Ejemplo de informe

1 ACCEPTED SOLUTION
Syndicate_Admin
Administrator
Administrator

@edant ,

Dado que la tabla de segmentación de datos no está conectada con su tabla de acciones, debe actualizar el código visual de su tarjeta como se muestra a continuación:

CountAllFlowsTest =
SWITCH (
    MAX ( 'slicer'[slicer] ),
    "Today",
        CALCULATE (
            COUNT ( 'Action'[ID] ),
            FILTER ( DateCalendar, 'DateCalendar'[Date] = TODAY () )
        ),
    "Last Week",
        CALCULATE (
            COUNT ( 'Action'[ID] ),
            FILTER (
                DateCalendar,
                DATEDIFF ( 'DateCalendar'[Date], TODAY (), DAY ) <= 7
                    && 'DateCalendar'[Date] <= TODAY ()
            )
        ),
    "Last Month",
        CALCULATE (
            COUNT ( 'Action'[ID] ),
            FILTER (
                DateCalendar,
                DATEDIFF ( 'DateCalendar'[Date], TODAY (), DAY ) <= 30
                    && 'DateCalendar'[Date] < TODAY ()
            )
        ),
    "Last Quarter",
        CALCULATE (
            COUNT ( 'Action'[ID] ),
            FILTER (
                DateCalendar,
                DATEDIFF ( 'DateCalendar'[Date], TODAY (), DAY ) <= 90
                    && 'DateCalendar'[Date] < TODAY ()
            )
        )
)

Salida:-

image.png

Gracias

Samarth

View solution in original post

2 REPLIES 2
Syndicate_Admin
Administrator
Administrator

@edant ,

Dado que la tabla de segmentación de datos no está conectada con su tabla de acciones, debe actualizar el código visual de su tarjeta como se muestra a continuación:

CountAllFlowsTest =
SWITCH (
    MAX ( 'slicer'[slicer] ),
    "Today",
        CALCULATE (
            COUNT ( 'Action'[ID] ),
            FILTER ( DateCalendar, 'DateCalendar'[Date] = TODAY () )
        ),
    "Last Week",
        CALCULATE (
            COUNT ( 'Action'[ID] ),
            FILTER (
                DateCalendar,
                DATEDIFF ( 'DateCalendar'[Date], TODAY (), DAY ) <= 7
                    && 'DateCalendar'[Date] <= TODAY ()
            )
        ),
    "Last Month",
        CALCULATE (
            COUNT ( 'Action'[ID] ),
            FILTER (
                DateCalendar,
                DATEDIFF ( 'DateCalendar'[Date], TODAY (), DAY ) <= 30
                    && 'DateCalendar'[Date] < TODAY ()
            )
        ),
    "Last Quarter",
        CALCULATE (
            COUNT ( 'Action'[ID] ),
            FILTER (
                DateCalendar,
                DATEDIFF ( 'DateCalendar'[Date], TODAY (), DAY ) <= 90
                    && 'DateCalendar'[Date] < TODAY ()
            )
        )
)

Salida:-

image.png

Gracias

Samarth

Brillante, que funciona a las mil maravillas.

Muchas gracias, Samarth. 🙂

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.