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
Anonymous
Not applicable

Dinamic calulations

Hello Every one!

 

I am having a big toruble with something it seem easy doing in excel, I would appreciate if someone could help me with this, so I have a data set with lost of clients and lots of materials, my data show the aumout of this materials wich the clients buy and sell, I need to track the the inventory the have each week, my data looks like this: 

128.PNG

I create a column with a index to show the order of the weeks acording to the combination of client and material...

what I need to create is this two columns (with calculated columns or measures) wich shows me the inical inventroy of the week and the final inventory (the next incial inventory would be the same as the final inventory as the last week), so for example the first client begin with 0 inventory in the first week, then bought 900 and sell 725, the final inventory for week one would be 0+900-725=175, then 175 will be the inicial inventory for week two, so the calculation for week two is going to be (175+2050-1400=825).

 

The result I want is this two columns to show like this: 

129.PNG

 I think i need a variable to save the calc. between buy and sell and bring it to the next period

 

I want to share my file, if someone knows how to share a file in this forum would be great

 

I really need some help!

 

Thanks

1 ACCEPTED SOLUTION

@Anonymous see attached, hope this will get you started.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

3 REPLIES 3
parry2k
Super User
Super User

@Anonymous you can share the file using onedrive/google drive



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Thanks @parry2k , here is the data, this is just a sample because the data is taken from SQL and its huge, but the principle is the same!

https://drive.google.com/open?id=1oTGpZoE02y40DLU-A_1INlLrSTegEWIP

 

I appreciate some help

 

@Anonymous see attached, hope this will get you started.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

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.