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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

AYUDA DE DAX

Quiero calcular la fecha de finalización actual del año fiscal (abril - marzo)

Supongamos que para hoy, la fecha de finalización del año fiscal debe ser 31-03-2021
1 ACCEPTED SOLUTION

@SonaSingh123

Hola, pruebe con esta columna calculada:

CurrentEndFiscalYear =
IF (
    MONTH ( 'Table'[Date] ) <= 3;
    DATE ( YEAR ( 'Table'[Date] ); 03; 31 );
    DATE ( YEAR ( 'Table'[Date] ) + 1; 03; 31 )
)

saludos

Victor




Lima - Peru

View solution in original post

6 REPLIES 6
Greg_Deckler
Community Champion
Community Champion

Eso no es mucho para seguir. Vea si mi Inteligencia del Tiempo el Camino Duro proporciona una manera diferente de lograr lo que usted está buscando.

https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TIT...



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

No es un profesional en Dax. Por favor, puede ayudar en esto. Probé fórmulas, pero obteniendo datos equivocados.

No tengo claro lo que quieres. ¿Está diciendo que desea tener una medida "total ytd" que va del 1 de abril de 2019 al 31 de marzo de 2020, por ejemplo? Si es así, tal vez algo como:

Measure =
  VAR __Date = MAX([Date])
  VAR __Year = YEAR(__Date)
  VAR __FiscalEndMonth = 3
  VAR __FiscalEndDay = 31
  VAR __FiscalBeginMonth = 4
  VAR __FiscalBeginDay = 1
  VAR __FiscalBegin = DATE(__Year - 1,__FiscalBeginMonth,__FiscalBeginDay)
  VAR __FiscalEnd = DATE(__Year, __FiscalEndMonth,__FiscalEndDay)
RETURN
  SUMX(FILTER('Table',[Date] >= __FiscalBegin && [Date] <= __FiscalEnd),[Column])


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

No, señor.

Supongamos que la fecha de mi informe es hoy, entonces quiero agregar una columna más que contenga la fecha de finalización del ejercicio actual (31-03-2021)
FECHA DE INFORMECURRFISCALYEAREND
09-01-201531-03-2015
09-05-201531-03-2016

@SonaSingh123

Hola, pruebe con esta columna calculada:

CurrentEndFiscalYear =
IF (
    MONTH ( 'Table'[Date] ) <= 3;
    DATE ( YEAR ( 'Table'[Date] ); 03; 31 );
    DATE ( YEAR ( 'Table'[Date] ) + 1; 03; 31 )
)

saludos

Victor




Lima - Peru
Anonymous
Not applicable

Gracias hermano, funcionó.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Top Solution Authors
Top Kudoed Authors