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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Raul
Post Patron
Post Patron

Diferentes períodos para diferentes medidas

¡Hola a todos!

Tengo este archivo PBI Archivo

Necesito poder presentar el año seleccionado en la visualización con respecto al año anterior para mostrar los valores de las medidas. ¿Cómo puedo hacer esto?

Img1.JPG
Muchas gracias.

5 REPLIES 5
Arklur
Resolver II
Resolver II

No hay necesidad de una 2a tabla de fechas, esto se puede hacer fácilmente usando sólo 1 con las medidas correctas:

MaxYearValue = 
VAR vMaxYear = 
    MAX ( DateTable[Year] )
RETURN
    CALCULATE ( 
        SUM ( Data[Value] ),
        DateTable[Year] = vMaxYear
    )
PreviousYearValue = 
VAR vMaxYear = 
    MAX ( DateTable[Year] )
RETURN
    CALCULATE ( 
        SUM ( Data[Value] ),
        DateTable[Year] = vMaxYear - 1
    )

image.png

Gracias @Arklur y @amitchandak por su ayuda. No es exactamente lo que necesitaba, pero me ha dado un par de ideas.

Hola , @Raul

¿Puedes explicar un poco más?

Por ahora, no hay ningún otro contenido de descripción en el subproceso. Si todavía necesita ayuda, por favor comparta más detalles con nosotros.

Saludos
Equipo de soporte de la comunidad _ Eason

Esta es mi solución:

Medidas:

T.Facturas = ABS(CALCULATE(SUM(Contabilidad[Amount]),Contabilidad[Document Type]=1))
TotalFacturas ?
Var ActualYear = MAX(Calendario[Año])
Return IF(MAX(Periodos[Año])=ActualYear, [T.Facturas], IF(MIN(Periodos[Año])=ActualYear-1,CALCULATE([T.Facturas], DATEADD(Calendario[Fecha], -1,YEAR)), [T.Facturas]))
amitchandak
Super User
Super User

@Raul, consulte si esto puede ayudar

https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601

Necesita dos tablas de fechas en tal caso

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.