Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hello, everyone,
It is necessary for me to perform the inventory calculation using the attached data set, but I do not know how to implement the second recursive DAX formula that uses the previous calculated inventory value.
In advance, thank you very much for your support.
Product | Date | IN | OUT | Stock | DAX |
A | 28-ago-20 | 10000 | 2060 | 7940 | Stock = IN -OUT |
A | 29-ago-20 | 0 | 2830 | 5110 | Stock = (IN + Stock Yesterday) - OUT |
A | 30-ago-20 | 0 | 1920 | 3190 | |
A | 31-ago-20 | 10000 | 1920 | 11270 | |
A | 01-sep-20 | 0 | 1920 | 9350 | |
A | 02-sep-20 | 0 | 2490 | 6860 | |
A | 03-sep-20 | 20000 | 3288 | 23572 | |
A | 04-sep-20 | 0 | 3288 | 20284 | |
A | 05-sep-20 | 0 | 3288 | 16996 |
Solved! Go to Solution.
See a solution in the other thread you posted:
https://community.powerbi.com/t5/Desktop/Como-calcular-el-inventario/m-p/2714090#M948254
Proud to be a Super User!
Paul on Linkedin.
See a solution in the other thread you posted:
https://community.powerbi.com/t5/Desktop/Como-calcular-el-inventario/m-p/2714090#M948254
Proud to be a Super User!
Paul on Linkedin.
I really appreciate your valuable help, thank you very much.
Hi @Cipriano
If your date column has only unique values then you do
Stock =
VAR CurrentDate = TableName[Date]
VAR OnAndBeforeTable =
FILTER ( TableName, TableName[Date] <= CurrentDate )
RETURN
SUMX ( OnAndBeforeTable, TableName[IN] - TableName[OUT] )
I appreciate you, but it has different values.
User | Count |
---|---|
67 | |
61 | |
47 | |
33 | |
32 |
User | Count |
---|---|
87 | |
72 | |
56 | |
49 | |
45 |