First, join by Desc. I convert date, string to date and filter by 2013-07-01. Group by ticketid, type and count of Price; cross tab by type and values is count Price. Replace nulls with zero and apply a formula to DealCount. Next, count all ticketid and sum of DealCount and again i apply a formula: ([dealCount]/[Total]) *100 and i get the result.