Recommendation for best way to create this visualization

Options

I have 2 columns 'years old when moved in' and 'Length of stay in Days' What I am looking to do is create a card (histogram?) that will take the ages and put them in buckets then show an average length of stay in days for each of those buckets. I already used the histogram to show the distribution of ages as a count, and it went smooth. Now trying to add this second layer to it has left me scratching my head.



Comments

  • GrantSmith
    Options

    You can utilize a beast mode to defined the different buckets and then drop your length column into your chart and use the average aggregate on it.

    CASE WHEN `Years old when moved in` >= 70 THEN '70+'
    WHEN `Years old when moved in` >= 70 THEN '60'
    WHEN `Years old when moved in` >= 70 THEN '50'
    WHEN `Years old when moved in` >= 70 THEN '40'
    ELSE '<30'
    END
    


    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**