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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

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
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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

Top Solution Authors