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
cbtekrony
Resolver I
Resolver I

Pronóstico calculado basado en el crecimiento anterior de los AOE

Necesito crear un pronóstico basado en el % de crecimiento de años anteriores. A continuación se muestra mi tabla de Excel, quiero que esto se calcule automáticamente cada mes en PowerBI en lugar de tener que actualizar manualmente en Excel cada mes. Tengo problemas para averiguar cómo calcular las dos últimas columnas en Power BI y conseguir que los años futuros también se muestren. Cualquier ayuda sería apreciada.

Pronóstico del crecimiento del año ventas EO del año Pronóstico basado en pronóstico de crecimiento del 19% basado en un crecimiento del 16%

2016$6,553,524.60
2017$7,571,281.700.16
2018$8,999,105.400.19
2019$10,069,232.560.12
2020$11,933,395.440.19
2021 $14,142,679.28$13,866,404.83
2022 $16,760,977.91$16,112,529.22
2023 $19,864,014.08$18,722,488.01
2024 $23,541,529.47$21,755,216.22
Porcentaje de crecimiento promedio en años pasados0.16
1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

Hola @cbtekrony ,

Trate de medir así :

Forecast based on 16% growth =
VAR current_year =
    YEAR ( TODAY () )
VAR lastest_year =
    MAX ( 'Table (2)'[Year ] )
VAR avg_growth = [AVG_Growth]
VAR last_year_sales =
    CALCULATE ( LASTNONBLANK ( 'Table (2)'[Sales], 1 ), ALL ( 'Table (2)' ) )
RETURN
    last_year_sales
        * CALCULATE (
            PRODUCTX ( 'Table (2)', 1 + avg_growth ),
            FILTER (
                ALL ( 'Table (2)' ),
                'Table (2)'[Year ] <= lastest_year
                    && (
                        ISBLANK ( 'Table (2)'[Sales] )
                            && 'Table (2)'[Year ] > current_year
                    )
            )
        )

test_Calculated Forecast Based on Previous YOY growth.PNG

Ejemplo .pbix

Saludos
Liang
Si este post ayuda, entonces considera Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.

View solution in original post

2 REPLIES 2
V-lianl-msft
Community Support
Community Support

Hola @cbtekrony ,

Trate de medir así :

Forecast based on 16% growth =
VAR current_year =
    YEAR ( TODAY () )
VAR lastest_year =
    MAX ( 'Table (2)'[Year ] )
VAR avg_growth = [AVG_Growth]
VAR last_year_sales =
    CALCULATE ( LASTNONBLANK ( 'Table (2)'[Sales], 1 ), ALL ( 'Table (2)' ) )
RETURN
    last_year_sales
        * CALCULATE (
            PRODUCTX ( 'Table (2)', 1 + avg_growth ),
            FILTER (
                ALL ( 'Table (2)' ),
                'Table (2)'[Year ] <= lastest_year
                    && (
                        ISBLANK ( 'Table (2)'[Sales] )
                            && 'Table (2)'[Year ] > current_year
                    )
            )
        )

test_Calculated Forecast Based on Previous YOY growth.PNG

Ejemplo .pbix

Saludos
Liang
Si este post ayuda, entonces considera Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.

amitchandak
Super User
Super User

@cbtekrony , Pruebe con una tabla de fecha de año

This Year = CALCULATE(sum('order'[Qty]),filter(ALL('Date'),'Date'[Year]=max('Date'[Year])))
Last Year = CALCULATE(sum('order'[Qty]),filter(ALL('Date'),'Date'[Year]=max('Date'[Year])-1))
YOY = divide([This Year]-[Last Year],[Last Year])

Future= 
var _last = lastnonblankvalue('Date'[year],[YOY])
var _lastv = lastnonblankvalue('Date'[year],[This Year])
var _lasty = calculate(Max('Date'[Year]),filter(Table,not(isblank(Table[Sales]))))
return
calculate(_lastv*power(_last,max('Date'[year])-_last), filter(Date[year] =maxx(Date[year])))

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.