Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply

Tiempo Intelegence

Tengo una matriz de datos donde Value solo puede estar en dos estados 1 o 0. Cada valor tiene su propia marca de tiempo del cambio de evento de 1 a 0, etc.

Screenshot_1.png

Cuando construyo gráfico de líneas PowerBI me devuelve esto:

Screenshot_2.png

Lo que necesito:Screenshot_3.png

¿Qué medida necesito escribir para ponerme rojo grapfic? La tabla de tiempo ya lo ha hecho.

1 ACCEPTED SOLUTION

@yingyinr PBI también se congela con esta medida:(

Traté de usar una construcción diferente, ahora todo está bien. ¡Ty para pedir ayuda!

Measure =
VAR currDate =
    MAX ( CalendarTime[Time] )
VAR prev =
    CALCULATE (
        MAX ( Statistics[Timestamp] ),
        FILTER ( ALLSELECTED ( Statistics ), [Timestamp] <= currDate )
    )
RETURN
    CALCULATE (
        MAX ( Statistics[Value] ),
        FILTER ( ALLSELECTED ( Statistics ), [Timestamp] = prev )
    )

View solution in original post

7 REPLIES 7
amitchandak
Super User
Super User

@Bessonnizza1992 , Bajo forma, Activar escalonado.

Ty para responder, pero esta opción no me ayuda.

Por ejemplo, tengo dos puntos

Valor 1 - Marca de tiempo 00:00:00

Valor 0 - Marca de tiempo 00:21:37

Así que mesuare debe calcular todos los puntos entre esto.

Valor 1 - Marca de tiempo 00:00:01

Valor 1 - Marca de tiempo 00:00:02

Valor 1 - Marca de tiempo 00:00:03

Valor 1 - Marca de tiempo 00:00:04

y así sucesivamente.

Hola @Bessonnizza1992 ,

¿Cuál es el resultado deseado? Según los datos de ejemplo, si la tabla es la que desea:

expected result.JPG

Saludos

Rena

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@yingyinr, gracias por responder!

Sí, esta tabla es exactamente lo que necesito. Me las arreglé para escribir una medida que rellena los valores, pero la tabla CalendarTime tiene una fila 86400, y cuando intento agregar medida en valores (gráfico de líneas) PBI es freze.

Como resultado quiero buid este gráfico:

Bessonnizza1992_0-1601906741063.png

Tengo una idea con otra medida. No necesito rellenar todas las líneas, sólo necesito obtener el valor de la línea no en blanco anterior y sustituirlo en el (índice de línea actual - 1). Mb, ¿sabes cómo puedo hacerlo?

Aquí mi ejemplo https://dropmefiles.com/vH1NG

¡Saludos!

Hola @Bessonnizza1992 ,

He actualizado su archivo pbix de muestra, por favor compruebe si eso es lo que desea. Creo una medida como se muestra a continuación para obtener los valores:

Measure = 
VAR _curtime =
    MAX ( 'CalendarTime'[Time] )
VAR _curvalue =
    CALCULATE (
        MAX ( 'Statistics'[Value] ),
        FILTER ( 'Statistics', 'Statistics'[Timestamp] = _curtime )
    )
VAR _pretime =
    CALCULATE (
        MAX ( 'Statistics'[Timestamp] ),
        FILTER (
            ALL ( 'Statistics' ),
            'Statistics'[Timestamp] < _curtime
        )
    )
VAR _prevalue =
    CALCULATE (
        MAX ( 'Statistics'[Value] ),
        FILTER ( ALL ( 'Statistics' ), 'Statistics'[Timestamp] = _pretime )
    )
RETURN
    IF ( ISBLANK ( _curvalue ), _prevalue, _curvalue )

time intelligence.JPG

Saludos

Rena

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@yingyinr PBI también se congela con esta medida:(

Traté de usar una construcción diferente, ahora todo está bien. ¡Ty para pedir ayuda!

Measure =
VAR currDate =
    MAX ( CalendarTime[Time] )
VAR prev =
    CALCULATE (
        MAX ( Statistics[Timestamp] ),
        FILTER ( ALLSELECTED ( Statistics ), [Timestamp] <= currDate )
    )
RETURN
    CALCULATE (
        MAX ( Statistics[Value] ),
        FILTER ( ALLSELECTED ( Statistics ), [Timestamp] = prev )
    )

Hola @Bessonnizza1992 ,

It's complace escuchar que su problema ha sido resuelto. Y gracias por compartir su solución para nosotros. Gracias.

Saludos

Rena

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors