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

Promedio acumulado por Mes y Año de un Recuento

Buenas noches, estoy intentando calcular en una tarjeta el promedio acumulado mensual por año, de acuerdo al mes y año seleccionado. Pero al intentar hacerlo me ahorra el mismo resultado del recuento y no el promedio acumulado. He intentado con el siguiente Calculo: Promedio = AVERAGEX (GROUPBY (Calendario, Calendario [Año], Calendario [Mes]), CALCULATE ([Tot_Casos_Gestionados])) Tot_Casos_Gestionados = IF(CALCULATE(DISTINCTCOUNT(Casos_Gestionados_Cartera[No. Caso]))=0, 0, CALCULATE(DISTINCTCOUNT(Casos_Gestionados_Cartera[No. Caso]))) Este es el modelo de la tabla y la estructura de datos Muchas gracias

1 ACCEPTED SOLUTION

Hello @SoleyGomez 

Kumail_0-1625068696754.png

 

El cálculo es correcto porque hay pocos casos que son comunes en enero y febrero; sin embargo, son únicos cuando solo tomamos febrero y, por lo tanto, aparecen en un recuento distinto, sin embargo, no aparece en un recuento distinto del año hasta la fecha.

 

Si esta publicación ayuda, considere Aceptarla como la solución para ayudar a los otros miembros a encontrarla más rápidamente y realmente agradecer su aprobación.

 

Regards

Kumail Raza

 

View solution in original post

17 REPLIES 17
Kumail
Post Prodigy
Post Prodigy

Hola,

 

Si pudiera enviar un archivo .pbix de muestra que demuestre lo que busca obtener. Realmente ayudaría a proporcionarle una solución rápida.

 

Saludos
Kumail Raza

Por este medio no me permite compartir archivos

@SoleyGomez 

Puede agregar el archivo a la unidad y agregar el enlace aquí

 

Regards

Kumail Raza

Disculpame, la verdad no se como es... o no entiendo... cuando dices "agregar el archivo a la unidad", puedes ser más especifico.

Agregue el archivo a Drive o Dropbox y comparta el enlace aquí

Hello @SoleyGomez 

 

The solution file is attached for your quick reference.

Kumail_0-1625060994103.png

https://drive.google.com/file/d/1-UIJqWNr0mmJMUBJbab9qX1_GdxEQu97/view?usp=sharing

 

Did this post help you? If yes, please consider Accept it as the solution to help the other members find it more quickly & I would love to see your like.

 

Regards

Kumail Raza

 

Hola, creo que estamos cerca...jejejej

Estos son los resultados esperados.

SoleyGomez_0-1625066309931.png

 

En el documento que compartes, para mayo el resultado es 1489 pero el correcto deberia ser 1514.

 

SoleyGomez_1-1625066470319.png

 

 

 

Hello @SoleyGomez 

Kumail_0-1625068696754.png

 

El cálculo es correcto porque hay pocos casos que son comunes en enero y febrero; sin embargo, son únicos cuando solo tomamos febrero y, por lo tanto, aparecen en un recuento distinto, sin embargo, no aparece en un recuento distinto del año hasta la fecha.

 

Si esta publicación ayuda, considere Aceptarla como la solución para ayudar a los otros miembros a encontrarla más rápidamente y realmente agradecer su aprobación.

 

Regards

Kumail Raza

 

Super Claro!!... Gracias por la aclaración

Excelente solución!!

Eres el mejor!! Muchas Gracias

Hi, @SoleyGomez 

 

I can see your file, Some questions require you to explain which value in these two measures you need to modify, and what the result should be, so that I can test.

vjaneygmsft_0-1625035779784.png

 

Best Regards

Janey Guo

 

Hello, yesterday responding to your comment, I described the detail to you, I wrote it in English as you requested.

SoleyGomez_0-1625056695099.png


If you have more questions, I will be attentive.

v-janeyg-msft
Community Support
Community Support

Hi, @SoleyGomez 

 

You can simply try like this:

Promedio = AVERAGEX ('Casos_Gestionados_Cartera', CALCULATE ([Tot_Casos_Gestionados]))

Best Regards

Janey Guo

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hola, muchas gracias, sin embargo, esta opción tambien la habia intentado y no funciona.

El promedio debe ser acumulado por mes y año en curso. 

 

SoleyGomez_0-1624884640086.png

 

@SoleyGomez 

 

Try:

 

Promedio =
AVERAGEX (
    SUMMARIZE ( 'Casos_Gestionados_Cartera', [year], [month] ),
    CALCULATE ( [Tot_Casos_Gestionados] )
)

 

If the result still doesn't work, Can you show some sample data in the and your desired result? I'm not clear about the specific context and the relationship between the date,slicer,etc...

It’s better to post in English, otherwise I may not understand well.

 

Best Regards

Janey Guo

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

The table " Casos_Gestionados_Cartera " shows a list of requests managed, each one identified by a “Id” (No. Caso).

 

SoleyGomez_5-1624981504912.png

 

I did different measurements to count the cases with different features, for example Tot_Casos_Gestionados counts the total of managed cases. In this report, when i applying the segmentation by year and by month, it shows the total of cases managed in that period of time (May / 2021).

SoleyGomez_6-1624981533067.png

 

Now, in this image, the year 2021 and the month May are selected, I would like in the report to calculate the annual accumulated average per month. For the selection of the year 2021 and the month May, the expected result would be:

SoleyGomez_7-1624981579399.png

 

This is the data structure.

SoleyGomez_8-1624981654458.png

 

I did the calculation you suggested, but, by selecting each month, it isnt performing the calculation of the accumulated average per month and per year. Returns the same value of managed cases.

SoleyGomez_9-1624981675006.png

 

SoleyGomez
Frequent Visitor

Captura.PNGCaptura1.PNGCaptura2.PNG

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.