Forum Discussion
RadoslawM
7 years agoNew Member
Subtracting rows
Hi folks, I'm new here and quite new to power BI. I have two tables: 1. Items with purchase date & Quantity ItemNo PurchaseDate Quantity Index 854 20/03/2019 32 2 854 30/04/...
v-juanli-msft
7 years agoCommunity Support
Hi RadoslawM
My output is a bit different from yours.
Create columns
clc_quan = CALCULATE(SUM('Table 1'[Quantity]),FILTER(ALLEXCEPT('Table 1','Table 1'[ItemNo]),'Table 1'[PurchaseDate]<=EARLIER('Table 1'[PurchaseDate])))
clc_quan = CALCULATE(SUM('Table 1'[Quantity]),FILTER(ALLEXCEPT('Table 1','Table 1'[ItemNo]),'Table 1'[PurchaseDate]<=EARLIER('Table 1'[PurchaseDate])))
Column = IF([clc_for]=BLANK(),0,[clc_quan]-[clc_for])
Please tell me if i misunderstand anything.
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.