Archive

Archive

Group months into Year range

 HI there is have x axis as months which i would like to categorise as 0-12Mnths, 13-24Mnths etc in the xaxis. Is there a beast mode to do this? I already have a beast mode calculation to compbine two columns to get the months (`Year` * 12) + `Month`, however i would now like the x-axis to be grouped as above. Any assistance appreciated!!

 

 

Comments

  • Domo Employee

    You could create try something like this:

    1. CASE WHEN ((`Year` * 12) + `Month`) > 0 AND ((`Year` * 12) + `Month`) <= 12 THEN '0 - 12 Months'
      WHEN ((`Year` * 12) + `Month`) > 12 AND ((`Year` * 12) + `Month`) <= 24 THEN '13 - 24 Months'
      WHEN ((`Year` * 12) + `Month`) > 24 AND ((`Year` * 12) + `Month`) <= 36 THEN '25 - 36 Months'
      WHEN ((`Year` * 12) + `Month`) > 36 AND ((`Year` * 12) + `Month`) <= 48 THEN '37 - 48 Months'
      END

    And just add enough WHEN clauses for the number of years you're looking at.

     

    Hope that helps,

    ValiantSpur

     

    **Please mark "Accept as Solution" if this post solves your problem
    **Say "Thanks" by clicking the "heart" in the post that helped you.

Welcome!

It looks like you're new here. Members get access to exclusive content, events, rewards, and more. Sign in or register to get started.
Sign In