I want to user cohort visualization, but it kind of different from the cohort example on http://demo.redash.io/queries/67#table . 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:
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.
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(user_totals.total AS integer) AS total
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.