Summing values within a range in access

mardi 6 janvier 2015

Dear All...Happy New Year :)



Quick question



Suppose I have 2 Tables as follows



Table A



Range - Lower - Upper

0-50 - 0 - 50

51-100 - 51 - 100

101-200 - 101 - 200





Table B



ID - Claim

1 - 35

2 - 56

3 - 101

4 - 53

5 - 12

6 - 75





I want a query that will give the following result



Range - Count of Claim - Sum of Claim

0-50 - 2 - 47

51-100 - 3 - 184

101-200 - 1 - 101



How do I do this?, obviously I cannot join them as there is no common field



I tried an expression Count of Claim: Sum([TableB]![Claim]> [TableA]![Lower] And [TableB]![Claim]<= [TableA]![Upper])



But Im not getting desired result...I know Im off but dont know where



Any help will suffice





Summing values within a range in access

0 commentaires:

Enregistrer un commentaire

 

Lorem

Ipsum

Dolor