How to analysis new user and repeater and create a dimension with logs

I have over a thousand rows in the data table below and am trying to create a stacked bar chart. The chart is grouped by new users/repeaters, with the x-axis representing the datehour [month], and the y-axis representing the number of users.

user id | date(timestamp) | item

When I use runningSum or distinct_count to determine if a user is a repeater, and drop a calculated field onto the chart, I encounter the following error message as documented:

Custom aggregations can’t be converted to a dimension. They also can’t be dropped into the field well as a dimension.

Is there any way to resolve this?

Hi @Lisa,

Can you try to determine new users and repeaters differently? I don’t think you need to use runningSum or distinct_count for that.

First timestamp = minOver(timestamp, [{user id}], PRE_AGG)
New user or repeater = ifelse(timestamp = {First Timestamp}, ‘New User’, ‘Repeater’)

1 Like

@David_Wong it worked perfectly. thank you so much.

1 Like

@David_Wong
When the same user buys items many times in the same month, the user number is double-counted as both of new users/repeaters… how can I resolve this? I only need new user count the first month

Hi @Lisa, please post this as a new topic. @David_Wong may not have seen it, since you last post was , “it worked perfectly. thank you so much.”