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
Anonymous
Not applicable

Material rodante

Hola, necesito calcular el material rodante para esto:

Mcarotenuto89_0-1599556974720.png

la acción antes de Octubre/2019 es de 6314 euros

el stock de octubre debe ser de 6314+ ENTRATE (octubre) - CHIUSE(octubre)

stock de octubre de noviembre +ENTRATE(noviembre) - CHIUSE(noviembre)

¿cómo puedo hacerlo? Muchas gracias

1 ACCEPTED SOLUTION

Hola @Mcarotenuto89 ,

Puede crear una medida como se indica a continuación:

Result =
VAR _ent =
    SUMX (
        FILTER (
            ALLSELECTED ( 'Test' ),
            'Test'[Date] <= MAX ( 'Date'[Mese-Anno] )
                && 'Test'[Date] >= DATE ( 2019, 10, 1 )
        ),
        [ENTRATE]
    )
VAR _chiu =
    SUMX (
        FILTER (
            ALLSELECTED ( 'Test' ),
            'Test'[Date] <= MAX ( 'Date'[Mese-Anno] )
                && 'Test'[Date] >= DATE ( 2019, 10, 1 )
        ),
        [CHIUSE]
    )
RETURN
    IF (
        MAX ( 'Date'[Mese-Anno] ) < DATE ( 2019, 10, 1 ),
        6314,
        6314 + ( _ent - _chiu )
    )

Rolling stock.JPG

Saludos

Rena

View solution in original post

7 REPLIES 7
amitchandak
Super User
Super User

@Mcarotenuto89, para todo el mes después de la oct que necesita construir como

Stock de Cumm 6314 + CALCULATE(SUM(Sum[ENTRATE]),filter(date,date[date] <-maxx(date,date[date]))) -CALCULATE(SUM(Sum[CHIUSE]),filter(date,date[date] <-maxx(date,date[date])))

Con un calendario de fechas. En caso de que tenga mes generar fecha a partir de eso.

Para obtener lo mejor de la función de inteligencia del tiempo. Asegúrese de que tiene un calendario de fechas y que se ha marcado como la fecha en la vista de modelo. Además, únete a ella con la columna de fecha de tus hechos. recomienda:
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/

Vea si mi seminario web sobre Time Intelligence puede ayudar: https://community.powerbi.com/t5/Webinars-and-Video-Gallery/PowerBI-Time-Intelligence-Calendar-WTD-Y...


Apreciamos tus Felicitaciones.

Anonymous
Not applicable

i used somenthing as you propose, the only problem is because i need to set as value only for october 3614+ the delta and after that the formula work perfectly , is t possible in BI?

@Mcarotenuto89, puede agregar como

• [Fórmula antigua] + if(Max(Table[Month])-"Oct-2019", 3614, 0)

Anonymous
Not applicable

stiil not working, i try to explain what i need in excel :

 

Mcarotenuto89_0-1599580746583.png

 

 

ENTRATE, CHIUSE are measure

Misura 3 is the delta of ENTRATE-CHIUSE

Mese-Anno is 'Date table'[Mese-Anno]

 

 

Hola @Mcarotenuto89 ,

Puede crear una medida como se indica a continuación:

Result =
VAR _ent =
    SUMX (
        FILTER (
            ALLSELECTED ( 'Test' ),
            'Test'[Date] <= MAX ( 'Date'[Mese-Anno] )
                && 'Test'[Date] >= DATE ( 2019, 10, 1 )
        ),
        [ENTRATE]
    )
VAR _chiu =
    SUMX (
        FILTER (
            ALLSELECTED ( 'Test' ),
            'Test'[Date] <= MAX ( 'Date'[Mese-Anno] )
                && 'Test'[Date] >= DATE ( 2019, 10, 1 )
        ),
        [CHIUSE]
    )
RETURN
    IF (
        MAX ( 'Date'[Mese-Anno] ) < DATE ( 2019, 10, 1 ),
        6314,
        6314 + ( _ent - _chiu )
    )

Rolling stock.JPG

Saludos

Rena

Hola @yingyinr y @amitchandak
Tengo un problema similar que resolver.
Calculé Project EOM Stock usando su fomular, sin embargo, necesito que vuelva a 0 y reinicie nuevamente cuando sea negativo.
Mi resultado de deseo como se muestra:

betty_bui2602_0-1673516557771.png

¿Cómo puedo hacerlo?
Cualquier solución sugerida es muy apreciada. 🙂 Gracias

Anonymous
Not applicable

thank you very much 

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.