Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi everyone.
I've got a table with the following columns:
I want to create another column that makes the subtraction between the quantity in stock (4th column) and the moved quantity (last column), for each item, warehouse and date. Do you know how to do it?
For example, for the second row I'd like to obtain the value 788,07 (817,31-29,24).
Many thanks.
Solved! Go to Solution.
@matteomatilde
I am not sure if I understood it correctly, you can add a column as follows:
New Column = IF( [Quantita_movimentata] <> Blank() , [Quantita_in_Stock]-[Quantita_movimentata])
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@matteomatilde
I am not sure if I understood it correctly, you can add a column as follows:
New Column = IF( [Quantita_movimentata] <> Blank() , [Quantita_in_Stock]-[Quantita_movimentata])
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Thank you.
@matteomatilde See my article on Mean Time Between Failure (MTBF) which uses EARLIER: http://community.powerbi.com/t5/Community-Blog/Mean-Time-Between-Failure-MTBF-and-Power-BI/ba-p/3395....
The basic pattern is:
Column =
VAR __Current = [Value]
VAR __PreviousDate = MAXX(FILTER('Table','Table'[Date] < EARLIER('Table'[Date])),[Date])
VAR __Previous = MAXX(FILTER('Table',[Date]=__PreviousDate),[Value])
RETURN
__Current - __Previous
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 33 | |
| 29 |
| User | Count |
|---|---|
| 132 | |
| 86 | |
| 85 | |
| 68 | |
| 64 |