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
gonzampy
New Member

Grafico comparativo entre 2 años

Hola, soy nuevo en PowerBi y necesito de su ayuda.

Necesito hacer un gráfico comparativo entre 2 años y no lo estoy logrando.

Tengo una tabla de ventas con fecha y años, he agregado en mi informe el filtro del 2 años en donde el usuario debe elegir los años que quiera comparar.

Pasa que cuando Yo selecciono los años en estos filtros (ej. 2021 y 2022) y mi gráfico me sale en blanco, me pueden ayudar para lograr mi objetivo por favor?

Gracias de antemano

2 REPLIES 2
Syndicate_Admin
Administrator
Administrator

@Syndicate_Admin ,

Me gustaría sugerirte que crees una tabla de segmentación de datos independiente:

Slicer = distinto('tabla'[año])

A continuación, cree una medida como la siguiente y agréguela al valor del conjunto de filtros visuales = 1.

Medida = SI(SELECTEDVALUE(«Tabla»[año]) en VALORES(rebanadora[año]),1,0)
Si entendí mal su significado, por favor comparta algunos datos de muestra y el resultado esperado con nosotros.
Saludos
Arrendajo
Syndicate_Admin
Administrator
Administrator

@Syndicate_Admin , si tiene fecha, con ayuda de la tabla de fechas o la fecha de su tabla

Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(allselected('Date'),'Date'[date] <=max('Date'[date])))

Helpful resources

Announcements
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 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors