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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

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
Super User
Super User

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!:
Power BI Cookbook Third Edition (Color)

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!:
Power BI Cookbook Third Edition (Color)

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.

Top Solution Authors
Top Kudoed Authors