Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hola
Tengo ventas desde enero de 2021 hasta octubre de 2021, ahora quiero mostrar las ventas del segundo semestre del mes (es decir, para el mes de septiembre necesito mostrar las ventas del 16/09/2021 al 30/09/2021, para el mes de octubre del 16/10/2021 al 31/10/2021) para la duración actual de 6 meses.
Por favor, ayúdame a hacerlo.
Gracias
AshDil.
Solved! Go to Solution.
@AshDil , Cree una medida como esta con la ayuda de la tabla de fechas
LAst 6 meses onlt últimos 15 días =
var _max = maxx(allselected('Date1'),'Date'[Date])
var _min = eomonth(_max,-6) +1
var _day = 16
devolución
CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Date] >=_min && 'Date'[Date] <= _max && day('Date'[Date]) >=_day ) )
o
LAst 6 meses onlt últimos 15 días =
var _max = maxx(allselected('Date1'),'Date'[Date])
var _min = eomonth(_max,-6) +1
var _day = 16
devolución
CALCULATE(sum('Table'[Qty]), FILTER(('Date'),'Date'[Date] >=_min && 'Date'[Date] <= _max && day('Date'[Date]) >=_day ) )
o
LAst 6 meses onlt últimos 15 días =
var _max = eomonth(today(),-1)
var _min = eomonth(_max,-6) +1
var _day = 16
devolución
CALCULATE(sum('Table'[Qty]), FILTER(('Date'),'Date'[Date] >=_min && 'Date'[Date] <= _max && day('Date'[Date]) >=_day ) )
Para obtener lo mejor de la función de inteligencia del tiempo. Asegúrese de tener un calendario de fechas y que se haya marcado como la fecha en la vista del modelo. Además, únalo con la columna de fecha de su/s hecho/s. Consulte:radacad sqlbi My Video Series Aprecie sus felicitaciones.
Debe agregar filtro en su medida.
Intenta crear algo como
_Sales 2nd Half = CALCULATE(SUM('Table'[Amount]),FILTER(Date,DAY(Date[Date])>15))
@AshDil , Cree una medida como esta con la ayuda de la tabla de fechas
LAst 6 meses onlt últimos 15 días =
var _max = maxx(allselected('Date1'),'Date'[Date])
var _min = eomonth(_max,-6) +1
var _day = 16
devolución
CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Date] >=_min && 'Date'[Date] <= _max && day('Date'[Date]) >=_day ) )
o
LAst 6 meses onlt últimos 15 días =
var _max = maxx(allselected('Date1'),'Date'[Date])
var _min = eomonth(_max,-6) +1
var _day = 16
devolución
CALCULATE(sum('Table'[Qty]), FILTER(('Date'),'Date'[Date] >=_min && 'Date'[Date] <= _max && day('Date'[Date]) >=_day ) )
o
LAst 6 meses onlt últimos 15 días =
var _max = eomonth(today(),-1)
var _min = eomonth(_max,-6) +1
var _day = 16
devolución
CALCULATE(sum('Table'[Qty]), FILTER(('Date'),'Date'[Date] >=_min && 'Date'[Date] <= _max && day('Date'[Date]) >=_day ) )
Para obtener lo mejor de la función de inteligencia del tiempo. Asegúrese de tener un calendario de fechas y que se haya marcado como la fecha en la vista del modelo. Además, únalo con la columna de fecha de su/s hecho/s. Consulte:radacad sqlbi My Video Series Aprecie sus felicitaciones.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.