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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Syndicate_Admin
Administrator
Administrator

Fórmulas avanzadas

Hola a todos

Estoy trabajando en la automatización de nuestros informes de Excel a PowerBI y en algunos casos tenemos una adición incremental desde el día 1 y en otro caso una adición de un año por encima.

Adjunto el siguiente enlace tiene los datos de muestra. Los valores de Highlied in Yellow deben transformarse en PowerBI (Columna E y F), ayuda de Kinldy.

https://docs.google.com/spreadsheets/d/1GlcUWtb1hYPf8l1RVgIgz6JxTug30zobTo0BT_5nxL4/edit#gid=0

Saludos

Naveed

2 REPLIES 2
Syndicate_Admin
Administrator
Administrator

Cree una tabla de dimensiones para el año y cree una relación de uno a muchos con la tabla principal:

model.png

Utilice este campo 'Tabla de años'[dYear] en el objeto visual.

Cree y dé formato a las siguientes medidas:

Sum Existing = 
SUM(fTable[Existing])
Sum New = 
SUM(fTable[New])
Total = 
[Sum Existing] + [Sum New]
Running Total New =
CALCULATE (
    [Sum New],
    FILTER (
        ALL ( 'Year Table' ),
        'Year Table'[dYear] <= MAX ( 'Year Table'[dYear] )
    )
)
Renewal % =
VAR _PY =
    CALCULATE (
        [Running Total New],
        FILTER (
            ALL ( 'Year Table' ),
            'Year Table'[dYear]
                = MAX ( 'Year Table'[dYear] ) - 1
        )
    )
RETURN
    DIVIDE ( [Sum Existing], _PY )
Renewal % based on LY =
VAR _PY =
    CALCULATE (
        [Total],
        FILTER (
            ALL ( 'Year Table'[dYear] ),
            'Year Table'[dYear]
                = MAX ( 'Year Table'[dYear] ) - 1
        )
    )
RETURN
    DIVIDE ( [Sum Existing], _PY )

result.png

¡Esto es increíble! Funcionó, muchas gracias 🙂

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.