views:

151

answers:

1

I have data in this form,

Article ID  Company A Company B Company C
1            Featured  Mentioned  --
2            Mentioned  Featured  Mentioned
3            Mentioned  --          --
4            Featured  Mentioned  Mentioned
5            Mentioned  Mentioned  Featured

I’d like to show, for example, how many times Company B was mentioned in an article where Company A was featured. I can write a manual query to answer that, however, I thought perhaps there’s a more elegant way to show in a grid the counts of all combinations. Someone could then see how many times Company C was mentioned in an article where Company A or B was featured, and vice versa.

Does anyone have any suggestions on how to approach this? I’m just not feeling creative today and all I can think of is the lame, brute-force, manual method ;)

+2  A: 

If you could add a filter drop-down on each column, like the auto-filter in Excel, the users could select 'Mentioned' for Company A and 'Featured' for Company B and the number of rows displayed would be the answer to the "how many" question.

Tony Andrews