You want a front end solution?
Create a straight table chart, with a calculated dimension
=if( Match(DimField,'A','B'), 'AB','CD')
and as expression
load *, div(rowno()+1,2) as field3 inline [
final: NoConcatenate load concat(f1) as f1, sum(f2) as f2 resident source group by field3;
DROP Table source;
what's the rationale of the letter groups?
Have a look into the qvw file.
Hope it helps.
On what basis and AB and CD should be grouped? what if E, F, G, H available? Is there any logic to group?
Can you tell the grouping logic,
for your example you can use straight table with calculated dimension =pick(match(Col1,'A','B','C','D'),'AB','AB','CD','CD')
then in expression sum (Col2)
Retrieving data ...