Forum Discussion
SudhanshuD4512
9 months agoFrequent Visitor
Query Exceeds
I have created a calculated column like this A= IF ( ISBLANK('Fact'[Inv No]), 'Fact'[Amt], IF ( 'Fact'[account_id] = "AP", 'Fact'[local_amt], 'Fact'[local_amt] * -1 ) ) After this i have c...
- Anonymous8 months ago
Hi SudhanshuD4512,
Thank you for reaching out to the Microsoft Fabric Forum Community, and special thanks to Hans-Georg_Puls , kushanNa , syahmisi98 and amitchandak for prompt and helpful responses.
I’ve tried to reproduce the scenario using the M code below. Please review and adjust it according to your data source. If the issue still persists, feel free to share more details, and we’ll be happy to assist further.
Thanks & Regards,
Prasanna Kumar
SudhanshuD4512
9 months agoFrequent Visitor
Net Activity =
IF (
ISBLANK('Fact'[Inv No]),
'Fact'[Amt],
IF (
'Fact'[account_id] = "AP",
'Fact'[local_amt],
'Fact'[local_amt] * -1
)
)
Debit is calculated as if we sum net activity, if(net activity>0,net activity,0)
Credit if(net activity<0,net activity,0)*-1
- SudhanshuD45129 months agoFrequent Visitor
Inv Num AccountID Local Amount Amt 1000 AP 300 100 1000 AP -350 200 1000 AP 400 200 input
Output below i wantInv Num AccountID Net Activity Debits Credits 1000 AP 350 350 0