Cohort with text dimensions not supported?


I want to user cohort visualization, but it kind of different from the cohort example on . On that example, first dimensions are date and the data is using timestamp format.

But i want using text as my first dimension. In my query, i’m getting result like this:

But when i want to user cohort visualization, it can’t read my date value. Like this:

It says undefined NaN. Is redash cannot read text format to be first dimension? Or maybe there are other way to do itt, just let me know. Maybe you can help me @arikfr



The library we use to draw the cohort visualization assumes the dimensions are dates and does some date manipulation, which results in the NaNs… So unfortunately with current implementation it’s not possible.


Thank you for the answer.

In the example, there are total metrics , what is it mean? Because it didn’t match if i use group by for value by date.

*marked with yellow colour.

Thanks before @arikfr


This is the total population of this cohort (this is why it’s the same for each date).


I don’t understand how this cohort query is working seriously. Can you help with this dataset ?

Here is the result of data looks like:

Here is the result of the cohort viz is:

Can you help me to understand what’s the problem with the dataset?

CAST(results.cohort AS DATE) AS DATE,
CAST(results.months AS integer) AS month_number,
CAST(results.actives AS integer) AS value,
CAST( AS integer) AS total

Here is the part of the query?


It expects the column name to be day_number regardless of the interval. So try changing CAST(results.month AS integer) AS month_number to CAST(results.month AS integer) AS day_number.


Yes arikfr,
we tried that as well. But, results are still disappointing
Here is the Image for dataset:
Here is the cohort viz:

As you can see in the dataset., sept. 2 is supposed to have day 8 cohorts, but in visualisation, you can see only 3 days cohorts. Any help?