Hi sir ,, Actually I have an existing table with a columns like ... I vil give one example in the below ..my existing table is :
S no|Subcategory| cost|amount
1|team outing|100|200
2|revenue|300|440
3|depreciation itis|450|600
4|depreciation erp|700|800
5| other facility costs|600|900
And so on.... This is my existing table ..and in this still more columns are there
Now I want a final table like For example
Sno|subcategory|offshoreamount|onshoreamount
The above are the column names And I want some calculations based on the existing table like
The below us my final table:
Subcategory|offamnt|onamnt
Total cor|900|1000
Gross margin|1100|1200
Pat|1090|2000
pbt|4000|567
(above amount values are just an example values not the results from the formula )
And so on ...
The final table is like the above And Calculations are
'Total cor' as subcategory
1)If subcategory in (teamouting,depreciation itis) then the cost as offamnt
2)If sum(subcategory in (teamouting,depreciation itis) then the cost+1 ) as onamnt
'Gross margin' as subcategory
3) If sum(subcategory in (teamouting,depreciation itis,depreciation erp) then the cost-1 ) as offamnt
4)If sum(subcategory in (teamouting,depreciation itis,depreciation erp) then the cost-1 ) as onamnt
And for every subcategory row ...the calculation columns offamnt and onamnt are taken based on the subcategory of the existing table ...
I got a requirement as existing table and now my target is to achieve the final table ....Please help me in this ...thanks..