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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Syndicate_Admin
Administrator
Administrator

Fórmula dinámica de trimestre de DAX

Me estoy enfrentando a un problema cuando estoy haciendo crecimiento degrwoth para el trimestre 3 , degrwoth mostrando alto

Necesito trimestre 3 hasta la fecha , significa trimestre 3 inicio de 1july a 30sept 2020 y 1 julio a 30Sept2021,
así que para el 1 de julio hasta la fecha (la fecha de hoy es el 20 de julio de 2021 ) Así que necesito
Trimestre3 2021 = 1 de julio al 20 de julio de 2021
Trimestre3 2020 = 1 de julio al 20 de julio de 2020
cuando 30august vendrá entonces fórmula shwo para hasta 1july tto 30 agosto entonces nuevo trimestre vendrá
Q32021 = var _max = date(year(today()),9 ,30) var _min = date(year(today()),7 ,1)
return CALCULATE(sum(sales[Amt]), FILTER(ALL(DATE),DATE[date] >=_min && DATE[date] <= _max) )

Q32020 = var _max = date(year(today())-1,9 ,30) var _min = date(year(today())-1,7 ,1)
return CALCULATE(sum(sales[Amt]), FILTER(ALL(DATE),DATE[date] >=_min && DATE[date] <= _max) )


Q3 20V21% = var _grow=DIVIDE([Q32021]-[Q32020],[Q32020],BLANK())
return IF([Q32021]>[Q32020],ABS(_grow),-ABS(_grow)) @amitchandak @Fowmy @TomMartens

1 REPLY 1
Syndicate_Admin
Administrator
Administrator

@bilalkhokar73 , la función de inteligencia de tiempo debe ayudar

QTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(('Date'[Date])))

El año pasado mismo QTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(dateadd('Date'[Date],-1,Year)))

O sin funciones de TI

QTD Hoy=
var _max = maxx(allselected('Date'), 'Date'[Date])
var _month = mod(mes(_max),3)
var _min = date(year(_max),month(_max) -1* if(_month=0,3,_month) ,1)
var _day = _max
devolución
CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Date] >=_min && 'Date'[Date] <= _day) )

LYQTD hoy=
var _max = maxx(allselected('Date'), 'Date'[Date])
var _month = mod(mes(_max),3)
var _min = date(year(_max)-1,month(_max) -1* if(_month=0,3,_month) ,1)
var _day = date(year(_max)-1, month(_max),day(_max))
devolución
CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Date] >=_min && 'Date'[Date] <= _day) )

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

May 2025 Monthly Update

Fabric Community Update - May 2025

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

Top Solution Authors