Forum Discussion
thongnguyen2414
4 years agoFrequent Visitor
Variable for Repeatable calculation
Hello - I really need your advices about the variable for something like Repeatable calculation ( I have no idea if I can call it like this ^^ ) - I am in trouble to calculate column/data for th...
- Anonymous4 years ago
Hi thongnguyen2414 ,
I'd suggest you create measures instead:
_1 = var _pre= CALCULATE(SUM('Table'[Q'ty]),FILTER(ALLSELECTED('Table'),[Date]=MAX('Table'[Date])&& [Op. No]=MAX('Table'[Op. No])-1)) return IF(_pre=BLANK(),BLANK(), SUM('Table'[Q'ty]) -_pre)_2 = CALCULATE([_1],PREVIOUSDAY('Table'[Date]))_3 = [_1]+[_2]_5 = CALCULATE([_3],PREVIOUSDAY('Table'[Date]))_6 = [_1]+[_5]The final output is shown below:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
wdx223_Daniel
4 years agoCommunity Champion
is it the logic?
1, Column 6 always equal the total amount until today
2, Column 5 is the total amount until yesterday
3, Column 4 is Column6 - Column5