Forum Discussion
Transaction analysis
hey TomMartens ,
just to specify, the credit adjustments that can be matched to the purchase will be for the same amount but will be negative. from the dataset, the only valid credit adjustment would be for margaret carter because purchase amount and credit adjustment amount are equal (but opposite signs). The credit adjustment for Jim Halpert would not be valid (no matching purchase that it can be associated with).
Also, is there any way to adjust the cash withdrawal formula for cases where the amounts withdrawn on the same day are different? I spotted a few instances in another dataset where the formula didn't pick up the same day withdrawals because the $ amounts were different.
First make the column amount positve.
Amount2 = IF(CashWithdrawal[amount]<0;CashWithdrawal[amount]*-1;CashWithdrawal[amount])
Then search in the earlier transactions.
CreditAdjustment =
CALCULATE(
MAX(CashWithdrawal[amount]);
FILTER(
CashWithdrawal;
[Employee name]=EARLIER([Employee name])
&& CashWithdrawal[Amount2]=EARLIER(CashWithdrawal[amount])
&& CashWithdrawal[transaction type]="credit adjustment"
))Result;