I am trying to show a Histogram of the number of users per account. my table is currently at the user_id level with the associated account in a separate column.
I want to roll this up in a calculated field, rather than doing it in the data source so I can reuse the data source for other purposes. The issue is that i can only provide a single field for the histogram and am not sure how to aggregate the data to the account level in a calculated field for this to work. If I partition by (or countOver) account, I believe that will count duplicates and if i do a count(user_id) that will just give me a single value and wont chart anything on the histogram.
As a side note, i get a VISUAL_CALC_REFERENCE_MISSING error when I try to use a countOver calculated field. Heres my formula:
countOver({USER_ID},[{ACCOUNT_ID}])
Thanks for the reply! I am not trying to show the account on the x axis, i am trying to the show the frequency of the count in a histogram. So on the X-axis I would have 1,2,3… and the count of customers with that many accounts on the Y-axis. Does that help clarify?
Apologies. I spoke too soon. I am still getting duplicate data. Yes I use the formula you listed above but when i put it into the histogram, it sums the rows so you get something like this
so i get count 2 two times for user1, when it should only be counted once. Do I need to apply another calculated field to achieve a single row per customer like below?
Please note that I’ve not only changed the two fields position in the formula, but I’ve also used the distinctCountOver. I think that should work, have you tried with that?