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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
todebrownie
Regular Visitor

Inventory Projection

Hello Community, how are you?

 

I'm new to PowerBI and I'm trying to create a inventory projection.

I would like to plot in a weekly basis (every monday) and would use some reports as starting point.

The calculations would be:

For the first week: Current stock on hand, first week consumption and all the shipments to be received that week consolidated on monday.

For the second week and on: Last week inital inventory - last week consumption + shipments received

When I update the file on the next week I would update the data base and the file would start based on that week monday.

 

Projection example.PNG

 

 

 I alredy created Calendar

Calendar.PNG

and imported the initial reports

 

Projection 2.PNG

 

But I don't know how to continue and get to a plot like this. Could some one please help me? I think that I need to create some mesures accumulating the period. Thanks in advance 🙂

 

Projection example.PNG

7 REPLIES 7
v-kkf-msft
Community Support
Community Support

Hi @todebrownie ,

 

Has your problem been solved? 

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.


Best Regards,
Winniz

Hi,

 

I sent you a private msg with my data. Could you please take a look?

Hi @todebrownie ,

 

I'm very sorry, I didn't read the private message before. I clicked on the link you shared, but it indicated that the link had expired. Could you please share it again?

 

vkkfmsft_0-1648688693079.png

 

Best Regards,
Winniz

Hi V,

 

I've just sent you again.

 

Thank you!

Hi @todebrownie ,

 

Has your problem been solved? If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.


Best Regards,
Winniz

Hi @todebrownie ,

 

Please try the following formula:

 

 

Shipments Acm = 
CALCULATE (
    SUM ( Shipments[Qty Invoiced] ),
    FILTER (
        ALL ( CalendarioM ),
        CalendarioM[WEEKNUM] < MAX ( CalendarioM[WEEKNUM] )
    )
)
Fcst Acm = 
CALCULATE (
    SUM ( Forecast[Value] ),
    FILTER (
        ALL ( CalendarioM ),
        CalendarioM[WEEKNUM] < MAX ( CalendarioM[WEEKNUM] )
    )
)
Measure = 
CALCULATE (
    FIRSTNONBLANKVALUE ( CalendarioM[WEEKNUM], [Initial Stock] ),
    ALLSELECTED ( CalendarioM[WEEKNUM] )
) - [Fcst Acm] + [Shipments Acm]

 

vkkfmsft_0-1648778719685.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

v-kkf-msft
Community Support
Community Support

Hi @todebrownie ,

 

Not sure about your data structure, I created the following example data based on my understanding.

 

vkkfmsft_0-1647494189578.png

 

Then create these measures:

 

Weekly Forecast = 
IF (
    MAX ( 'Calendar'[WeekDay] ) = 1,
    CALCULATE (
        SUM ( 'Daily Stock'[Consumption] ),
        FILTER (
            ALLSELECTED ( 'Calendar' ),
            'Calendar'[WeekNum] = MAX ( 'Calendar'[WeekNum] )
        )
    )
)
SumShipments = 
IF (
    MAX ( 'Calendar'[WeekDay] ) = 1,
    CALCULATE (
        SUM ( 'Daily Stock'[Shipments] ),
        FILTER (
            ALLSELECTED ( 'Calendar' ),
            'Calendar'[WeekNum] = MAX ( 'Calendar'[WeekNum] )
        )
    )
)
ForecastInventory = 
VAR current_Mo =
    CALCULATE (
        MIN ( 'Daily Stock'[Date] ),
        KEEPFILTERS ( 'Calendar'[WeekDay] = 1 ),
        ALLSELECTED ( 'Calendar' )
    )
VAR stock =
    CALCULATE (
        SUM ( 'Daily Stock'[Inventory] ),
        FILTER ( ALLSELECTED ( 'Calendar' ), 'Calendar'[Date] = current_Mo )
    )
VAR W_S =
    SUMX (
        FILTER (
            ALLSELECTED ( 'Calendar' ),
            'Calendar'[Date] < MAX ( 'Calendar'[Date] )
        ),
        [Weekly Forecast] - [SumShipments]
    )
RETURN
    IF (
        MAX ( 'Calendar'[Date] ) = current_Mo,
        SUM ( 'Daily Stock'[Inventory] ),
        IF (
            MAX ( 'Calendar'[WeekDay] ) = 1
                && MAX ( 'Daily Stock'[Date] ) <> BLANK (),
            stock - W_S
        )
    )

vkkfmsft_1-1647494204856.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.