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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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