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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anonymous
Not applicable

Comparación de tiempo con parámetros lógicos en MOM y YOY

En la tabla que se muestra a continuación, he hecho una comparación de intervalos de tiempo de los ahorros por mes.

Si considera la primera fila que asume que los datos del mes anterior de mi mes MIN es "0" y por lo tanto me da [datos de mes de 0-MIN] en Ahorro de carga o Ganancia/pérdida de LS

6.PNG

Quiero incluir una condición en mis medidas para que excluya el cálculo del primer mes y dé un espacio en blanco para esa fila en la tabla (aquí Fila de dic), pero todos los valores adicionales en las filas respectivas deben permanecer iguales.

Estas son mis medidas:

Loadability savings = SUMX(SUMMARIZE(dDate,dDate[Month],"_2",DIVIDE(SUMX('Prototype Modeling_Freight','Prototype Modeling_Freight'[Load Charge]),[Shipments],BLANK())*[Shipments Saved_trial]),[_2])
LS Gain/Loss = SUMX(SUMMARIZE(dDate,dDate[Month],"_3",[Loadability savings]-CALCULATE([Loadability savings],DATEADD(dDate[Date],-1,MONTH))),[_3])

6 REPLIES 6
Mariusz
Community Champion
Community Champion

Hola @Parthsh93

Prueba esto

LS Gain/Loss =
VAR __loadabilityPreviousMonth = 
    CALCULATE ( 
        [Loadability savings], 
        DATEADD ( dDate[Date], -1, MONTH ) 
    )
RETURN 
    IF ( 
        NOT ISBLANK( __loadabilityPreviousMonth ),
        [Loadability savings] - __loadabilityPreviousMonth
    )

Saludos
Mariusz

Si este post ayuda,entonces por favor considere aceptarlo como la solución.

Por favor, siéntase libre de conectarse conmigo.
Linkedin

Anonymous
Not applicable

@Mariusz Gracias, funcionó

Mariusz
Community Champion
Community Champion

Hola @Parthsh93

Prueba esto

LS Gain/Loss =
SUMX (
    SUMMARIZE (
        dDate,
        dDate[Month],
        "_3",
        VAR __loadability = [Loadability savings]
        RETURN
            IF (
                NOT ISBLANK ( __loadability ),
                __loadability
                    - CALCULATE ( [Loadability savings], DATEADD ( dDate[Date], -1, MONTH ) )
            )
    ),
    [_3]
)

Saludos
Mariusz

Si este post ayuda,entonces por favor considere aceptarlo como la solución.

Por favor, siéntase libre de conectarse conmigo.
Linkedin

Anonymous
Not applicable

7.PNG

@Mariusz He hecho una nueva medida como "prueba" con su opinión, pero conseguir esta discrepencia

amitchandak
Super User
Super User

@Parthsh93 , algo como esto

Ganancia/pérdida de LS ?
var _minx á eomonth(minx(allselected(ddate),dDate[Date]),0)
devolución
SUMX(SUMMARIZE(dDate,dDate[Month],"_3",[Ahorro de carga]-CALCULATE([Ahorro de carga],DATEADD(dDate[Date],-1,MONTH), dDate[Date]>_minx)),[_3])

Puede agregar este tipo de filtro en la fórmula deseada

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

hola @amitchandak he probado su opinión en "prueba 2",

pero da el mismo resultado

8.PNG

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.