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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
redhol
Frequent Visitor

Weekly Inventory through Inventory movements column

Hi All,

 

Might be an easy one but I have yet to figure it. I am trying to display closing stock for each week for some inventory analysis that I am working on - I am struggling to get this value as I do not have a "Stock on Date" field our ERP but I do have a ledger of all our stock movements (sales, delvieries, returns etc. displayed as +1 / -1 and so on.

 

What I want to be able to do is have a table split by week and the table display the position up to the close of that week, example in the picture.

WSSI.png

The problem I have at the moment is that my formula is calculating that week only and not the value up to that date (or week end in this case).

 

Hope this makes sense and any help is appreciated!

 

1 ACCEPTED SOLUTION

Hi @redhol,

 

The cause could be the [Date] in the dates. Please try the formula below.

Rolling Stock =
CALCULATE (
    SUM ( HR_StockMovements[MovementQty] ),
    FILTER (
        ALL ( 'Calculations'[Date]),
        'Calculations'[Date] <= MAX ( 'Calculations'[Date] )
    )
)
Rolling Stock =
CALCULATE (
    SUM ( HR_StockMovements[MovementQty] ),
    FILTER (
        ALL ( 'Calculations'[Date].[Date] ),
        'Calculations'[Date].[Date] <= MAX ( 'Calculations'[Date].[Date] )
    )
)

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @redhol,

 

Can you share a sample?

What's your formula for now? 

Are the 1 and 2 in the snapshot weeks?

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Dale,

 

THanks for the reply - data for stock movements is shown below

 

Sample.pngAnd current formula is

 

Rolling Stock =
CALCULATE(
Sum(HR_StockMovements[MovementQty]),
Filter(
ALL('Calculations'[Date].[Date]),
'Calculations'[Date].[Date] <= MAX('Calculations'[Date].[Date])
)
)

 

The date formulas are in a seperate table as I have a few different tables that the dashboard is pulling from. 

 

And yes the 1 and 2 are weeks in the snapshot.

 

Many Thanks,

Hi @redhol,

 

The cause could be the [Date] in the dates. Please try the formula below.

Rolling Stock =
CALCULATE (
    SUM ( HR_StockMovements[MovementQty] ),
    FILTER (
        ALL ( 'Calculations'[Date]),
        'Calculations'[Date] <= MAX ( 'Calculations'[Date] )
    )
)
Rolling Stock =
CALCULATE (
    SUM ( HR_StockMovements[MovementQty] ),
    FILTER (
        ALL ( 'Calculations'[Date].[Date] ),
        'Calculations'[Date].[Date] <= MAX ( 'Calculations'[Date].[Date] )
    )
)

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

That works perfect. 

 

Thanks for your help. 

Helpful resources

Announcements
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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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