how to get the occurence of the count of values or texts

punna111

New member
Local time
Yesterday, 16:24
Joined
Jun 14, 2015
Messages
9
Hi all,

below is my data i have.

Amt
100
50
100
50
300
50
50



i need the count based on the occurrence, Count if is giving only total of count, but i need as below.

Amt time of occurrence
100 1
50 1
100 2
50 2
300 1
50 3
50 4




Thanks,
 
No, There is no unique ID,
 
Then no, you cannot accomplish what you want with the data you have in a query. If you add an autonumber primary key, then you could do a Running Count Query (search the forum for that term).
 
Thank you for your advise, I admit that.

To get maximum response only i posted, from Next time I will give the Original post link if any.

coming to my question:
I am very surprised we are not able get a cumulative count for one value in access.
 
Its easy to understand if you correct your assumption about your table's data. Your data isn't stored like you displayed it. It isn't in nice rows, its stored more like the attached image. There is no order to your data in a table.

In that image, which 50 should be 1? Which 50 should be 2? Which 50 should be 3? etc.

That's why you can't do what you want. There is no order in a table. Now, if you are able to apply order, you can decide which 50 should be first, second, third, etc.. Until then, they are just another 50 randomly stored somewhere.
 

Attachments

  • nums.png
    nums.png
    2.3 KB · Views: 61
thanks for reply,

can i use "order by" so that, we will get one type of sorting
 
No, because it will not produce a unique enough order. You need a way to uniquely sort your list. You can't do that on a field with same values.
 

Users who are viewing this thread

Back
Top Bottom