Months in card not in order

Options

I have a card for filled positions and it was working all fine. All of a sudden after updating Dec yesterday, the order of the months changed to a random order. I tried sorting the month, but it still did not correct. Any help is much appreciated.

Thanks,

Gunjan

Best Answers

  • MarkSnodgrass
    Answer ✓
    Options

    You should create two beast modes, one that will be used for displaying the month name in the pivot table and one for the sorting.

    Create a beast mode called MonthName that contains a formula like this: MONTHNAME(`Offer Accepted`) and drag this into your columns field.

    Create another beast mode called MonthNumber that contains a formula like this MONTH(`Offer Accepted`) and drag this into your sorting section.

    This should get it to display how you want.

    **Check out my Domo Tips & Tricks Videos

    **Make sure to <3 any users posts that helped you.
    **Please mark as accepted the ones who solved your issue.
  • GrantSmith
    GrantSmith Coach
    Answer ✓
    Options

    To clarify, the issue is that you're having is that your beast mode is always returning NULL now as the MONTH function returns a number 1-12 based on the month. MONTHNAME returns the name of the month. Instead of using a case statement to attempt to compare the value to the month names just use MONTH(`Offer Accepted`)

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

Answers

  • Jones01
    Jones01 Contributor
    Options

    @Gunjan ideally you would group the table by month and the COLUMNS would include a date rather than text as you are doing.

    Saying that if you added a beastmode with a case statement like

    case when month = 'Jan' then 1

    when month = 'Feb' then 2

    etc etc

    If you stick that in the order by rather than the String month it may work.

  • GrantSmith
    Options

    This is likely because you're sorting based on the Year first and also the month by name. You'll want to sort by the numerical version of the month first and then the year.

    You can use the MONTH function to get the month number. Alternatively you can use the LAST_DAY to get the last day of a month and sort on that instead of the year and the month.

    LAST_DAY(`DATE`)
    

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

    Hi,

    Thanks for your reply ..:-)

    I changed my beastmode to

    Case when MONTH(`Offer Accepted`) = 'Jan' then 1

    when MONTH(`Offer Accepted`) = 'Feb' then 2

    Now my table looks like this. LOL! Not sure what am I doing wrong

  • MarkSnodgrass
    Answer ✓
    Options

    You should create two beast modes, one that will be used for displaying the month name in the pivot table and one for the sorting.

    Create a beast mode called MonthName that contains a formula like this: MONTHNAME(`Offer Accepted`) and drag this into your columns field.

    Create another beast mode called MonthNumber that contains a formula like this MONTH(`Offer Accepted`) and drag this into your sorting section.

    This should get it to display how you want.

    **Check out my Domo Tips & Tricks Videos

    **Make sure to <3 any users posts that helped you.
    **Please mark as accepted the ones who solved your issue.
  • GrantSmith
    GrantSmith Coach
    Answer ✓
    Options

    To clarify, the issue is that you're having is that your beast mode is always returning NULL now as the MONTH function returns a number 1-12 based on the month. MONTHNAME returns the name of the month. Instead of using a case statement to attempt to compare the value to the month names just use MONTH(`Offer Accepted`)

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