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
MARLONHN
Regular Visitor

restar valor previo al valor actual

Hola a todos necesito ayuda, tengo una valor acumulado que se va incrementando con el tiempo, lo que necesito es desplegar el valor que ha acumulado en un tiempo especifico es decir, valor= valor actual- valor previo, adjunto la imagen de lo que hice y el resultado me parece en cero 

 

MARLONHN_0-1667589368765.png

 

1 ACCEPTED SOLUTION

Prueba con esta medida:

(Mi tabla es 'fTable')

 

Differencia con valor previo =
VAR _FechaAnterior =
    CALCULATE (
        MAX ( fTable[Fecha Flow] ),
        FILTER (
            ALL ( fTable ),
            fTable[Fecha Flow] < MAX ( fTable[Fecha Flow] )
        )
    )
VAR _ValorFechaAnterior =
    CALCULATE (
        SUM ( fTable[TOTALIZER] ),
        FILTER ( ALL ( fTable ), fTable[Fecha Flow] = _FechaAnterior )
    )
RETURN
    IF (
        ISINSCOPE ( fTable[Fecha Flow] ),
        SUM ( fTable[TOTALIZER] ) - _ValorFechaAnterior
    )

 

dif fecha ant.jpg

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






View solution in original post

8 REPLIES 8
PaulDBrown
Community Champion
Community Champion

Ya he visto la imagen. Para poder facilitarte una solución, o me pongo a replicar a mano tus datos para poder cargarlo en un PBIX, o me facilitas tú una muestra, que es copiar y pegar y reemplazar. 

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






puedes probar solo con unos cuantos valores ya que el PBIX no te funcionara por que los datos los estoy leyendo de una base de datos SQL, pero la idea es esta de la imagen

 

MARLONHN_0-1667598040812.jpeg

 

Te importaría copiar y pegar los datos en une mensaje por favor? Así me ahorro tener que replicarlos a mano. Gracias.





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






fecha FLOW CFM TOTALIZER Ft3 VALOR DESEADO
11/3/2022 11:14 5885.700195 6002.7 6002.7
11/3/2022 11:15 5885.700195 6152.7675 150.0675
11/3/2022 11:16 5885.700195 6306.586688 153.819188
11/3/2022 11:17 5885.700195 6464.251355 157.664667
11/3/2022 11:18 5885.700195 6625.857639 161.606284
11/3/2022 11:19 5885.700195 6791.50408 165.646441
11/3/2022 11:20 5885.700195 6961.291682 169.787602
11/3/2022 11:21 5885.700195 7135.323974 174.032292
11/3/2022 11:22 5885.700195 7313.707073 178.383099
11/3/2022 11:23 5885.700195 7496.54975 182.842677
11/3/2022 11:24 5885.700195 7683.963493 187.413743
11/3/2022 11:25 5885.700195 7876.062581 192.099088
11/3/2022 11:26 5885.700195 8072.964145 196.901564
11/3/2022 11:27 5885.700195 8274.788249 201.824104
11/3/2022 11:28 5885.700195 8481.657955 206.869706
11/3/2022 11:29 5885.700195 8693.699404 212.041449
11/3/2022 11:30 5885.700195 8911.041889 217.342485
11/3/2022 11:31 5885.700195 9133.817936 222.776047
11/3/2022 11:32 5885.700195 9362.163385 228.345449
11/3/2022 11:33 5885.700195 9596.217469 234.054084
11/3/2022 11:34 5885.700195 9836.122906 239.905437
11/3/2022 11:35 5885.700195 10082.02598 245.903074
11/3/2022 11:36 5885.700195 10334.07663 252.05065
11/3/2022 11:37 5885.700195 10592.42854 258.35191
11/3/2022 11:38 5885.700195 10857.23926 264.81072
11/3/2022 11:39 5885.700195 11128.67024 271.43098
11/3/2022 11:40 5885.700195 11406.88699 278.21675
11/3/2022 11:41 5885.700195 11692.05917 285.17218
11/3/2022 11:42 5885.700195 11984.36065 292.30148
11/3/2022 11:43 5885.700195 12283.96967 299.60902
11/3/2022 11:44 5885.700195 12591.06891 307.09924
11/3/2022 11:45 5885.700195 12905.84563 314.77672
11/3/2022 11:46 5885.700195 13228.49177 322.64614
11/3/2022 11:47 5885.700195 13559.20406 330.71229
11/3/2022 11:48 5885.700195 13898.18417 338.98011
11/3/2022 11:49 5885.700195 14245.63877 347.4546
11/3/2022 11:50 5885.700195 14601.77974 356.14097
11/3/2022 11:51 5885.700195 14966.82423 365.04449
11/3/2022 11:52 5885.700195 15340.99484 374.17061
11/3/2022 11:53 5885.700195 15724.51971 383.52487
11/3/2022 11:54 5885.700195 16117.6327 393.11299
11/3/2022 11:55 5885.700195 16520.57352 402.94082
11/3/2022 11:56 5885.700195 16933.58786 413.01434
11/3/2022 11:57 5885.700195 17356.92755 423.33969
11/3/2022 11:58 5885.700195 17790.85074 433.92319
11/3/2022 11:59 5885.700195 18235.62201 444.77127
11/3/2022 13:50 5885.700195 18691.51256 455.89055
11/3/2022 13:51 5885.700195 19158.80038 467.28782

Prueba con esta medida:

(Mi tabla es 'fTable')

 

Differencia con valor previo =
VAR _FechaAnterior =
    CALCULATE (
        MAX ( fTable[Fecha Flow] ),
        FILTER (
            ALL ( fTable ),
            fTable[Fecha Flow] < MAX ( fTable[Fecha Flow] )
        )
    )
VAR _ValorFechaAnterior =
    CALCULATE (
        SUM ( fTable[TOTALIZER] ),
        FILTER ( ALL ( fTable ), fTable[Fecha Flow] = _FechaAnterior )
    )
RETURN
    IF (
        ISINSCOPE ( fTable[Fecha Flow] ),
        SUM ( fTable[TOTALIZER] ) - _ValorFechaAnterior
    )

 

dif fecha ant.jpg

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






MARLONHN_0-1667843370765.png

 

PaulDBrown
Community Champion
Community Champion

Puedes por favor compartir una muestra no-confidencial de los datos o un enlace a un archivo PBIX sin datos confidenciales? También ayuda una imagen que muestre el resultado que buscas. Gracias.





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






He adjuntado una imagen de lo que necesito hacer que es basicamente tomar el valor actual y restarlo del valor anterior , en la imagen tambien he colocado la programacion que he hecho pero no me funciona ya que me arroja el valor 0 y deberia ser 706.2

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.

Top Solution Authors