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?
Hi @asdf1, can you show us better what you are doing and a sample of the data (or just the schema)?
Seems a strange behavior, we are missing something!
Just checking in since this thread hasn’t received a response in a while. Were you able to see andrepgn’s recent question, or did you find a solution yourself in the meantime? If not, please feel free to elaborate on any persistent issues that you are currently facing. If we do not hear back within the next 3 business days, I’ll go ahead and close out of this topic.
Since we have not heard back, I’ll go ahead and close this topic. However, please feel free to post again in the Quick Community and link this thread for any relevant information!