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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
HEW
Helper III
Helper III

Matrix visual with stock balance per week

I am trying to create a matrix where we can see the stock balance per article per week. Below I have made a very simple Excel overview of the tables, I am using.

Matrix.PNG

 

We have our stock table with one row per article showing the current stock quantity. We have our Inbound table with all purchase orders so be delivered the coming period (multiple rows per article) and our Outbound table with customer orders (also multiple rows per article). Is it possible to create a matrix where the primo stock qty is shown and then a balance for the coming weeks?

 

I have solved the balance with Inbound and Outbound, but I am not sure how to add the stock....

 

Thanks a lot in advance.

 

 

1 ACCEPTED SOLUTION
v-kelly-msft
Community Support
Community Support

Hi @HEW ,

 

Create a data table using :

 

 

date = CALENDARAUTO()

 

Then create a measure as below:

 

 

Final Stock 22 = 
CALCULATE(SUM('Stock Table'[Qty]) 
+
 CALCULATE(SUM('Inbound Table'[QTY]),filter('date','date'[Date] <=maxx('Inbound Table','Inbound Table'[Date])))
-
  CALCULATE(SUM('Outbound Table'[Qty]),filter('date','date'[Date] <=maxx('Outbound Table','Outbound Table'[Date]))))

 

Finally you will see:

 

Annotation 2020-03-18 173553.png

For the related .pbix file,pls click here.

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

View solution in original post

2 REPLIES 2
v-kelly-msft
Community Support
Community Support

Hi @HEW ,

 

Create a data table using :

 

 

date = CALENDARAUTO()

 

Then create a measure as below:

 

 

Final Stock 22 = 
CALCULATE(SUM('Stock Table'[Qty]) 
+
 CALCULATE(SUM('Inbound Table'[QTY]),filter('date','date'[Date] <=maxx('Inbound Table','Inbound Table'[Date])))
-
  CALCULATE(SUM('Outbound Table'[Qty]),filter('date','date'[Date] <=maxx('Outbound Table','Outbound Table'[Date]))))

 

Finally you will see:

 

Annotation 2020-03-18 173553.png

For the related .pbix file,pls click here.

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

Greg_Deckler
Super User
Super User

Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.