When you create this in Yellowfin, it might seem easy enough to do… but then you see that the names of the months are sorted incorrectly. You might already know that Yellowfin sort it’s data in alphabetical order – so how can you fix this so that your months appear chronologically?
To sort the months in chronological order (January, February, March and so on) you need to use Reference Codes in Yellowfin.
Reference codes enables you to do quite a few cool things in Yellowfin. For example, to translate a value held in the database to more a meaningful value. Reference Codes also give you the ability to assign a custom sort order to your data and define custom colours and images to values in your database.
Below there are steps that you can follow to assign a custom sort order to your data.
Create a new report based on the Ski-Team view. This is part of the tutorial content that can be installed when installing Yellowfin.
Add the Month (Dim) and Invoice Amount fields to the columns area.
You will notice that the months are sorted in alphabetical order, starting with April.
Open the column formatting menu through the field drop down arrow or the column formatting menu at the top of the page.
Change the format to Reference Code.
A new Reference Type option will appear. Click on “Create New” link.
Enter a name for the reference type, enable custom sort and click on define values.
You can now add the values using the screen below. You can manually enter the values, populate the values from your data source or from a CSV file. Click on the “Populate from data source” link, this will return all the unique Month (Dim) values from the data source.
After the data is returned from the data source, you can add your custom sort order next to the month names and click on Save.
Confirm that your new reference type is selected and close the column formatting menu.
Your data will now be sorted in chronological order.
This can be applied to sort any field in your report.