In the following data set:
Case id Finance id Revenue Payment
1 BR_1 31249 12,893
1 BR_2 8439 3153
1 BR_2 8439 222
1 BR_1 31249 15625
1 BR_2 8439 3,942
1 BR_2 8439 278
I am trying to create a pivot which shows output as:
Case id Finance id Revenue/Finance id Cost/Finance id Revenue/Case id Cost/Case id
1 BR_1 31249 28518 39688 36113
BR_2 8439 7595 39688 36113
I have got Revenue/Finance id and Cos/Finance id as min(Revenue,[Finance id]) and min(Revenue,[Finance id])
But not able to get it for case id. Also, I want to keep Revenue/Case id and Cost/Case id fixed irrespective of the filters. Please help here.