This is a typical and/or question in set analysis where I am stuck for a long time.
I want to sum the amount for those ids, where:
type_of_entry is both 'Revenue and Expense' or 'Revenue and Labor'
revenue type is 'CAF'
Expected ids are shown in bold colors
Eg...id 1 exists for both revenue and expense. Similarly, id 2 and 3 exist for both revenue and labor.
Result - > amount = 55 (5+40+10)
I have tried the below set analysis but is not working:
I would appreciate any help on this.
Regards
Sagnik



Are you accept the answer which is Python solution?
python solution
output