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
Zaky
Helper IV
Helper IV

Buscando ayuda para ejecutar la medida total

Hola expertos,

Busco ayuda de la siguiente manera:

1) Para contar para el estado de Devuelto para cada semana de cada mes.

2) Ejecución de la medida total para la devolución acumulativa para el estado devuelto anteriormente.

El resultado esperado debe ser el siguiente:

table.JPG

La tabla de datos está en este enlace>> https://1drv.ms/u/s!AqKwe2kf8OBIZ45s1gEQQqqgE-Q?e=LVhwg0

Gracias

1 ACCEPTED SOLUTION
v-jayw-msft
Community Support
Community Support

Hola @Zaky ,

Puede obtener el resultado siguiendo los pasos, pero no podría obtener el mismo objeto visual si está utilizando dos medidas.

Crear columnas.

Week = 
var currentweek=WEEKNUM('Table'[Month of Return],1)
var startWeek=WEEKNUM(DATE('Table'[Month of Return].[Year],'Table'[Month of Return].[MonthNo],1),1)
return
"week"&Currentweek-startWeek+1

month = FORMAT('Table'[Month of Return],"MMM")

Crear medidas.

Measure = COUNTROWS('Table')

Measure 2 = CALCULATE(COUNTROWS('Table'),FILTER(ALL('Table'),'Table'[Month of Return]<=MAX('Table'[Month of Return])))

El resultado se mostraría como se muestra a continuación.

14.PNG

15.PNG

Saludos

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

View solution in original post

3 REPLIES 3
v-jayw-msft
Community Support
Community Support

Hola @Zaky ,

Puede obtener el resultado siguiendo los pasos, pero no podría obtener el mismo objeto visual si está utilizando dos medidas.

Crear columnas.

Week = 
var currentweek=WEEKNUM('Table'[Month of Return],1)
var startWeek=WEEKNUM(DATE('Table'[Month of Return].[Year],'Table'[Month of Return].[MonthNo],1),1)
return
"week"&Currentweek-startWeek+1

month = FORMAT('Table'[Month of Return],"MMM")

Crear medidas.

Measure = COUNTROWS('Table')

Measure 2 = CALCULATE(COUNTROWS('Table'),FILTER(ALL('Table'),'Table'[Month of Return]<=MAX('Table'[Month of Return])))

El resultado se mostraría como se muestra a continuación.

14.PNG

15.PNG

Saludos

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
amitchandak
Super User
Super User

@Zaky , Puede unirse a la fecha con una tabla de fechas y en la tabla de fechas obtener la semana del mes como

Mes de Inicio - STARTOMONTH('Fecha'[Fecha])
WeekDay - WEEKDAY([Fecha],2) //monday
Inicio de la semana [Fecha] -[WeekDay]+1 //monday
Semana del mes : QUOTIENT(DATEDIFF(Minx(FILTER('Date',[Start Month]-EARLIER([Start Month])),'Date'[Start of Week]),[Date],DAY),7)+1

retorno de la cuenta (Tabla]) //retorno semanal

Ventas de Cumm : CALCULATE(countrows(Table]),filter(allselected(date),date[date] <-max(date[date]))

Estimado @amitchandak

Gracias por la solución. Pero no entiendo tu instrucción.

Me agradecería mucho si me puede mostrar la manera de hacer esto en . Ejemplo de PBIX.

La tabla de datos que he adjuntado en el enlace.

Gracias

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.