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
SebSchoon1
Post Patron
Post Patron

Can't calculate stock on hand

Hi guys, 

 

Many thanks for the great power bi community!

 

It is my first post I Searched a long time before sending this request.

 

I have a fact table. 

 

Which contains each movement types, dates, quantities, etc etc.

 

I created many measure filtering positive stock movements ( selected by calculate(sumx(quantity, movementtype = "supplier invoice"). Etc with changing the filter name in the filter part of the calculate for each positive movement type needed.

 

Like this calculate(sumx(quantity, movementtype = "xxxxx")

 

Same way for negative movements.

 

Then a formula.

 

Positive movement = a+b+c ="all positive measures" 

 

Same for negative movements.

 

I would like to calculate the stock on hand by warehouse. And only show items on hand.

 

But agreggated values are not correct. 

 

Moves are calculated from 2010 up to today.

 

I can provide more information if needed thanks guys!!

 

 

 

3 REPLIES 3
Whitewater100
Solution Sage
Solution Sage

Hi:

Can you share your file or example data, with example of correct result?  Thank you..

Hi,

 

Many thanks for your Answer,

SebSchoon1_1-1652700108831.png

relations

 

SebSchoon1_2-1652700254001.png

 

And when i check my stock level at item level it is ok i cand find each item.

 

However totals are wrong, in my 015 warehouse i should be around 41K items.

 

I think that the total is not calculated on todays available stock but on the whole Set of Data.

 

I also Have a Slicer which can probably impact the resulT.

SebSchoon1
Post Patron
Post Patron

I have not been really accurate.

 

I have finally created a formula doing

Positive movement (+) +negative movements (-) 

 

And that formula does not seems to give me the right information.

I also use a slicer with a calendar table.

 

To get an image of stock on demand.

 

However I can only use right side of that slicer, because if I use the left one some items can not to be taken into account. 

 

Ex if I want the average stock on one year I cannot do it

 

 

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.

Top Solution Authors