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
Syndicate_Admin
Administrator
Administrator

Ayuda con el promedio y la función Si

Hola compañeros, necesito ayuda con un problema, quiero resolver esto. En mi trabajo necesito diferentes escenarios como la mitad del año, un trimestre, etc. Cuando necesito ver el informe en Trimestre solo necesito un medio, pero si quiero ver en la mitad necesito los medios de seis meses, y cuando seleccioné meses la información debe estar en formato real (esto es lo que tengo), cualquiera puede ayudarme con este problema, por favor? La base de datos es la siguiente:

SebastianCM27_0-1634594848542.png

1 REPLY 1
Syndicate_Admin
Administrator
Administrator

@SebastianCM27 , ¿Necesitas medio año o 6 meses?

ejemplo para QTR

QTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(('Date'[Date])), Filter(Sales, Sales[Column] = "Media") )

últimos 6 meses

Rolling 6 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date ],MAX('Date'[Date]),-6,MONTH)

, Filter(Sales, Sales[Column] = "Medios") )

para medio año, la inteligencia tiene columnas como

Año de inicio = STARTOFYEAR('Fecha'[Fecha],"12/31")
Mitad = Mitad = si(fecha([año de inicio],[Fecha],mes)<6,1,2)
Medio año = [Año de inicio]*100 + [Mitad]
Rango sesesual = RANKX(all('Date'),'Date'[Half Year Start],,ASC,Dense)

y medidas, agregar filtro para medios
Este semestre = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Half Year Rank]=max('Date'[Half Year Rank])))
Último semestre = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Half Year Rank]=max('Date'[Half Year Rank])-1))

)

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors