Forum Discussion
Anonymous
7 years agoNot applicable
Subtract two unit quantities based on date slicer
I want to subtract the amount of units in inventory for different product types over a given timeframe. I've created the following dummy data to illustrate: The user should be able to select a...
- 7 years ago
Hi Anonymous ,
Add the following measure to your report:
Inventory Variation = VAR StartDate = MIN ( Inventory[Date] ) VAR EndDate = MAX ( Inventory[Date] ) RETURN CALCULATE ( SUM ( Inventory[Inventory (Units)] ); FILTER ( ALLSELECTED ( Inventory[Date] ); Inventory[Date] = EndDate ) ) - CALCULATE ( SUM ( Inventory[Inventory (Units)] ); FILTER ( ALLSELECTED ( Inventory[Date] ); Inventory[Date] = StartDate ) )Final result is as follows:
Regards,
MFelix
hejszyszki
5 years agoFrequent Visitor
Hi guys, what about when new product appears? I am struggling to change formula to include also this aspect. Do you have any ideas? I think i understand why its not included in formula output ( cuz its not finding product name value to subtract) but no idea how to change to do so.
MFelix edhans any ideas?
Best Regards,
PP