Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Added on April 30, 2024 9:47AM
Likes: 0
Replies: 3
I have a dataset with 5 names and their ages. I want to generate a bar chart with one bar which the length of bar represents the avg age. I want to show the color of bar as red if avg age>=35 and green if avg age<35.
How can I fulfil that?
dataset sample as follows:
name age
John 40
Abby 32
Lewis 55
Morgan 23
Joyce 40
Hi @Neville
,
I'm not sure exactly what you want to graph in your chart, and if you are looking for a bar per name. However, I think that you can probably use custom aggregations to accomplish this.
For example, I created the following two custom aggregations:
if(avg(age) > 35, avg(age), 0) if(avg(age) <= 35, avg(age), 0)
I then plotted both of my custom aggregations on my chart, allowing for two separate colors for each metric:
In this example, I also wonder if you want to add a reference line to the chart, to clearly identify your two groups.
If you are looking for a different type of chart, please provide a screenshot of what you are looking for so that we can assist!
Thank you,
Sarina
Thanks very much Sarina.
It seems that 'Custom aggregations' is a new feature for DSS12, just double checked my edition is DSS11.