Hi, 2 questions from me: 1. how can I do a line ch...
# gooddata-platform
Hi, 2 questions from me: 1. how can I do a line chart in which lines are colored based on a dimensional value 2. how can I create a line chart which segments on 2 different dimensions? Background: I have cohort data about an A/B Test. I have grouped all sessions starting on a specific day grouped into a cohort, and then I have conversion numbers for the following 60 days for each cohort. I want to do a chart that shows 1 line per cohort per A/B test variation. X-Axis shows the date, and Y-Axis shows the accumulated number of conversions for the cohort. I was able to create a cohort diagram without the A/B Test Variant, and with every cohort colored differently. Now I’d love to add the split by cohort and I’d like to color by A/B Test Variant. Is this possible?
Hi Thomas, this might depend on how your Data Model is configured; Is the A/B Test Variant an Attribute (any string) or a Fact (numeric)? How is the data presented there? But from your description, I think you’d be looking to build a line chart that: • Has the Date dimension in the Trend by section (the X axis) • The A/B Test Variant resultsin the Metric section (in order for this to work, this metric would need to return a numeric value) • And then Segment by the Cohorts The fundamental bit of that is that to get all 3 things in the line chart you need to have use the Metric section, which requires a Metric returning a numeric value. That might be a challenge, if the A/B Test Variant data is not numeric in the first place Once you have the line chart going, you can use the Configuration section to select the colors for each Cohort. --- As for the custom visualization question, it can be done via Dashboard Plugins, which can be developed from your end via our SDK. See this article for some more info!
@Francisco Antunes So far I had the variant as an attribute, which obviously doesn’t work. I’ll try it as a metric, even though I don’t fully understand how that would help me. In the metrics section so far, I have so far the conversion numbers. Having a second metric for the a/b test variant sounds weird (it will always be either 0 or 1). Lets see what I get
It doesn’t work this way. I can only add ONE metric in the metrics section as soon as I segment by something
I have • cohorts (a date) • variants (0 or 1) • conversion counts (a metric) • target date (also a date -> goes to x axis)
Yes, the segment by section limits the number of metrics to one. I see what you mean. I assume the A/B variant attribute only has 2 possible values (A or B 🙂); So in this case, you would be looking to have a line for each Cohort per Test A or B (basically splitting the Cohorts into the variant they took, correct?), displayed over time. Since A/B and Cohorts are different attributes, I don’t think what you’re looking for can be achieved on a line chart; You can either get the conversion numbers for each test type, or the numbers for each Cohort. How about adding a filter with the A/B test variant where you can select whether it’s A or B? This would not show all the datapoints per Cohort per Test, but it would give you the two results to compare;
I’d need to see them simultaneously. Can I combine two attributes into one via MAQL?
I’m thinking of an cohort+variant attribute
doesn’t yet solve the coloring, but would already help with splitting
It’s not possible to combine them via MAQL; MAQL’s main use is to create Metrics which must have a numeric result, so it doesn’t help in this case. To get the result you are looking for (on a line chart), I think you’d need to have a combined attribute in your data to start with: where the values are Cohort 1-A, Cohort 1-B, Cohort 2-A, and so on. Otherwise, the Line Chart limitation where you can only Segment By a single attribute will prevent you from getting the result you want. Again, this is a limitation of this visualization type; A Pivot Table, for example, would allow you to display all of the data you need, but it would be a different look altogether.
👀 1
I’ll have a look at the pivot as well then
👍 1
For fixed number of cohorts it is also possible to add multiple metrics in the insight and filter each of them differently using one or more attribute filters. e.g. • metric1 (cohort=cohort 1, test variant=A) • metric1 (cohort=cohort 1, test variant=B) • metric1 (cohort=cohort 2, test variant=A) • metric1 (cohort=cohort 2, test variant=B) Then you can assign different colour for each metric and give it descriptive alias.
👆 1