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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

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
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.