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
frenst
Frequent Visitor

Ayuda - Medida acumulada - reinicio hacente, sin campo de fecha

Hola amigos,

Tengo problema, estoy construyendo una medida que acumula la suma de algo, con esta fórmula, PERO hace que se reinicie con cada año:

ACUM META = 
CALCULATE(
 [MC_CANT VENTAS PRESUPUESTADAS POR CATEGORIA];
 FILTER(
  ALL(DIM_PERIODO_COMERCIAL);
  DIM_PERIODO_COMERCIAL[ANNO_COMERCIAL]<=MAX(DIM_PERIODO_COMERCIAL[ANNO_COMERCIAL])))

CUMMULATIVE.png

Estoy trabajando con Direct Query. En mi dimensión "tiempo" no tengo un campo de fecha.

Un ejemplo de mi dimensión "tiempo":

PERIODO COMERCIAL DIMENSION.png

Muchas gracias si me puedes ayudar

Salud

Fred

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hola

Escriba una fórmula de columna calculada para crear un campo Fecha. Esto también se puede lograr en el Editor de consultas, pero no estoy seguro de si está permitido en el modo de consulta directa

Fecha 1*("1/"&Datos[Mes_Comercial]&"/"&[Anno Comercial])

Cree una relación desde esta columna Fecha a la columna Fecha de la tabla de calendario.

Escriba esta medida

ACUM META = CALCULATE([MC_CANT VENTAS PRESUPUESTADAS POR CATEGORIA];DATESYTD(Calendar[Date],"31/12"))

Espero que esto ayude.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

4 REPLIES 4
v-lid-msft
Community Support
Community Support

Hola @frenst ,

Podemos usar la siguiente medida para cumplir con sus requisitos:

ACUM META =
CALCULATE (
    [MC_CANT VENTAS PRESUPUESTADAS POR CATEGORIA];
    FILTER (
        ALL ( DIM_PERIODO_COMERCIAL );
        DIM_PERIODO_COMERCIAL[ANNO_COMERCIAL]
            <= MAX ( DIM_PERIODO_COMERCIAL[ANNO_COMERCIAL] )
            && DIM_PERIODO_COMERCIAL[ANNO_COMERCIAL]
                >= ROUNDDOWN ( MAX ( DIM_PERIODO_COMERCIAL[ANNO_COMERCIAL] ) / 100; 0 ) * 100 + 1
    )
)


Saludos

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

Hola

Escriba una fórmula de columna calculada para crear un campo Fecha. Esto también se puede lograr en el Editor de consultas, pero no estoy seguro de si está permitido en el modo de consulta directa

Fecha 1*("1/"&Datos[Mes_Comercial]&"/"&[Anno Comercial])

Cree una relación desde esta columna Fecha a la columna Fecha de la tabla de calendario.

Escriba esta medida

ACUM META = CALCULATE([MC_CANT VENTAS PRESUPUESTADAS POR CATEGORIA];DATESYTD(Calendar[Date],"31/12"))

Espero que esto ayude.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Gracias, la lógica que propones funcionó bien. Construyo otra dimensión de tiempo con el campo de fecha, luego creo una relación con mi tabla y creo una nueva medida que se acumula bien.

Gracias

De nada.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

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.