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
Syndicate_Admin
Administrator
Administrator

datos de error de cálculo sumx

Hola

Gracias por su ayuda.

Tengo un problema en el que tengo el siguiente dax.

Corriendo12 meses 1 =
var currentdate=VALOR SELECCIONADO(HeadCount[EndOfMonth])
var año= AÑO(fecha actual)-1
var mt = MES(fecha actual)+1
var previousdate=DATE(YEAR(currentdate)-1,MONTH(currentdate),DAY(currentdate))
devolución
SUMX(FILTER(ALLSELECTED(HeadCount[EndOfMonth],HeadCount[Costcentre]),HeadCount[EndOfMonth]>=previousdate && HeadCount[EndOfMonth]<=currentdate),[Empoyees That Left 2])
Tengo el siguiente error
ivannye_0-1624947964891.png

¿Puedes ayudarme por favor

1 ACCEPTED SOLUTION
Syndicate_Admin
Administrator
Administrator

@ivannye , compruebe el tipo de datos de EndOfMonth, que puede causar este problema. Sobre todo la fórmula parece correcta, Pruebe este pequeño cambio

Corriendo12 meses 1 =
var currentdate=maxx(allselected(HeadCount),[EndOfMonth])
var año= AÑO(fecha actual)-1
var mt = MES(fecha actual)+1
var previousdate=DATE(YEAR(currentdate)-1,MONTH(currentdate),DAY(currentdate))
devolución
SUMX(FILTER(ALLSELECTED(HeadCount[EndOfMonth],HeadCount[Costcentre]),HeadCount[EndOfMonth]>=previousdate && HeadCount[EndOfMonth]<=currentdate),[Empoyees That Left 2])

View solution in original post

3 REPLIES 3
Syndicate_Admin
Administrator
Administrator

Ahora tengo un problema con ese cálculo.

ivannye_0-1624961197849.png

La columna devuelve el mismo número

Syndicate_Admin
Administrator
Administrator

Funcionó a las maravillas. Gracias

Syndicate_Admin
Administrator
Administrator

@ivannye , compruebe el tipo de datos de EndOfMonth, que puede causar este problema. Sobre todo la fórmula parece correcta, Pruebe este pequeño cambio

Corriendo12 meses 1 =
var currentdate=maxx(allselected(HeadCount),[EndOfMonth])
var año= AÑO(fecha actual)-1
var mt = MES(fecha actual)+1
var previousdate=DATE(YEAR(currentdate)-1,MONTH(currentdate),DAY(currentdate))
devolución
SUMX(FILTER(ALLSELECTED(HeadCount[EndOfMonth],HeadCount[Costcentre]),HeadCount[EndOfMonth]>=previousdate && HeadCount[EndOfMonth]<=currentdate),[Empoyees That Left 2])

Helpful resources

Announcements
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.