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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Roinka01
New Member

Recuento acumulado

Hola

Estoy usando un gráfico de líneas y columnas apiladas.

Me gustaría presentar para cada mes el total de eventos creados hasta ahora (no sólo para este mes, pero todo hasta este mes).

por ejemplo, Ene - 10 eventos, Feb - 20, Marzo - 15.

Entonces me gustaría ver en el gráfico de enero - 10, el 30 de febrero, el 45 de marzo y así sucesivamente.

En el eje compartido tengo el primer día del mes (que es una fecha tomada de la tabla Calendar defind en la base de datos).

En los valores de columna tengo una medida llamada - NoOfEvents.

Mi medida se define como NoOfEvents-CALCULATE(DISTINCTCOUNT(MyTable[event_id]), Filter(table2, some filter))

El problema es que puedo ver el recuento por mes y no el recuento acumulado por mes. Así que insetad de ver todos los eventos hasta este mes sólo puedo ver los eventos creados en ese mes.

Obtengo Jan - 10 eventos, Feb - 20, Marzo - 15.

En lugar de

Ene - 10, el 30 de febrero, el 45 de marzo

Por favor, avise ¿cómo debo cambiar mi medida para obtener el recuento acumulado?

Gracias

6 REPLIES 6
parry2k
Super User
Super User

@Roinka01 He respondido a la pregunta similar en este post

Me gustaría elogiossi mi solución ayudara.👉Si puedes pasar tiempo publicando la pregunta, también puedes hacer esfuerzos para dar a Kudos quien haya ayudado a resolver tu problema. ¡Es una muestra de agradecimiento!

Visítenos enhttps://perytus.com, su ventanilla única para proyectos/formación/consulta relacionados con Power BI.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

¿Se refiere a este código:

SUMX(FILTER(ALLSELECTED('Calendar'[Date]), 'Calendar'[Date]<- MAX('Calendar'[Date])),CALCULATE(DISTINCTCOUNT(TimeLog[Rig_Name])))

¿Puedes explicarlo?

No estoy seguro de cómo traducirlo a mi ejemplo.

@Roinka01 Como práctica recomendada, agregue la dimensión de fecha en el modelo y utilelo para los cálculos de inteligencia de tiempo y tiempo. Una vez agregada la dimensión de fecha, márquela como una tabla de fechas en las herramientas de tabla.

https://perytus.com/2020/05/22/create-a-basic-date-table-in-your-data-model-for-time-intelligence-ca...

Después de agregar la dimensión de fecha y agregar la relación con la tabla, la siguiente expresión funcionará.

Running Total = 
SUMX(
FILTER(
ALLSELECTED('Calendar'[Date]), --this is new calendar/date dimension you add to the model
'Calendar'[Date]<= MAX('Calendar'[Date])
),
CALCULATE(DISTINCTCOUNT(TimeLog[Rig_Name]))) --this will your table name and column name

Me gustaría elogiossi mi solución ayudara.👉Si puedes pasar tiempo publicando la pregunta, también puedes hacer esfuerzos para dar a Kudos quien haya ayudado a resolver tu problema. ¡Es una muestra de agradecimiento!

Visítenos enhttps://perytus.com, su ventanilla única para proyectos/formación/consulta relacionados con Power BI.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Gracias, pero me temo que no funciona. 😞

Además, no lo entiendo.

SUMX se debe utilizar cuando estamos realizando alguna fórmula en más de una sola columna a lo largo de las filas. Pero aquí sólo estamos contando una sola columna.

@Roinka01 no estoy seguro de por qué no funciona. y si simplemente respondes que no está funcionando, no sé cómo puedo ayudar más. Tienes que compartir qué medida has añadido, qué resultado estás obteniendo? ¿Hay algún filtro. Proporcione tantos detalles como pueda de lo contrario seguiremos adelante en círculos.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Hola

lo siento por el retraso i tuvo que dejar el cargo.

la medida es:

SumOfTotTv á sumx(filter(ALLSELECTED('Calendar'[FirstDayOfMonth]) , 'Calendar'[FirstDayOfMonth]<MAX('Calendar'[FirstDayOfMonth])),CALCULATE(DISTINCTCOUNT('Calendar'[FirstDayOfMonth])))

y lo que obtengo es (mientras tengo decenas de tús y de tales eventos):

Roinka01_0-1593338743882.png

Gracias por tu ayuda.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

Top Solution Authors
Top Kudoed Authors