I have a requirement to comapre 2 data sets one at a transaction level and one at an aggregated level.
Ex. I have a loans table and a branch table. The loans table has all transaction level details and contains lots of flags on basis of which a value is calculated. (Say A). A=sum((if Flag='Y',colA)). The Branch info is present in Loans table.
The Branch table has a pre calcuated value (Say B) for each month.
Now I have to show a bar chart whose dimension is Month and expression is sum(A)/Sum(B).
I can think of applying the logic at script level and grouping the data to the branch level and calculating A and then simply comparing it with B on chart, but I have 5 different things to calculate based on different conditions and comapre it with 5 different values of branch table.