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
pawelj795
Post Prodigy
Post Prodigy

Inventory valuation - FIFO

Hi, 
I'm creating inventory valuation (FIFO) according to below article:
https://radacad.com/dax-inventory-or-stock-valuation-using-fifo#comment-304039

The mentioned columns: "Previous Cumulative Sale" and "Previous Cumulative buy" doesn't work when I had more than 1 sell/buy per day.
How to fix that?

I tried to add comment below article, but it's not possible ;(

Alternatively, if you have any better solution to calculate stock valuation with FIFO, don't hesitate to describe this.



1 REPLY 1
v-joesh-msft
Solution Sage
Solution Sage

Hi @pawelj795 ,

What does "doesn't work" mean and what output you expect. Because both "Previous Cumulative Sale" and "Previous Cumulative buy" use the condition: "'Table1'[date] < myDate", you can adjust to "Table1'[date] <= myDate" if you want, if it is the same day, but you want to compare the size of the same day, you must have extra fields such as "time"/"index" to judge.

I created a demo like the following, added an "index" column to judge, you can see if it is the result you want:

32.PNG

31.PNG

Here is a demo, please try it:

https://qiuyunus-my.sharepoint.com/:u:/g/personal/pbipro_qiuyunus_onmicrosoft_com/EVuRUC8Is2RLh9dNZE... 

Best Regards,

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

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.