Creating and Sorting a Month field in Yellowfin 7

by | May 13, 2014

YF_LOGO
I recently created a report in Yellowfin 7 that I wanted to break down by months. The month was a calculated field based on the date, which I did via the views in the admin console but the issue I had was the sort was alphabetical. After a bit of reading I found that Yellowfin has the ability to sort using a custom list or ‘Org Ref Code’ as they call it. You can create it once and use it multiple times. I created one called ‘Months’ and referenced it from each view.
1. CALCULATING MONTH FROM DATE FIELD
Go to Administration > Admin Console > Views. Find the view you want to create the months field under and click it, then click on edit. It will ask if you want to clone it or edit existing. Cloning means it will create a draft version while you work on it then replace the view when you’ve finished. If you choose edit existing, you will not be able to revert back to the current version if anything goes wrong – so I suggest cloning. When you create a cloned view it will appear in the view list as the same name with ‘(cloned)’ after it. If you want to roll back to the original, just delete the cloned version.
Once you’re in the edit screen for the view you need to be on the second step which can be selected at the top left. Once on this, the main part will show you a list of all of your fields in the view, down the left you should see ‘Calculated Fields’, expand this as well as ‘Date Hierarchy’ underneath it. This will give you a list of items that can be calculated from a date field. Drag in the one you want, in this case ‘Month Name’, drag it to your list in the main window, you’ll need to place it somewhere in the list, otherwise it won’t allow it.
Once it’s in the list you’ll probably notice it has an exclamation mark next to it, that means it needs to be configured. Double click on your new field and the options should appear at the bottom.
Within the definition tab, at the bottom there’s an option to choose the field. Choose the date field you want to calculate the month from.
2 CUSTOM SORT FOR MONTH FIELD
Double click on the desired field in the view and change the format to ‘Org Ref Code’ and check ‘Create New Type’. At this point you have the option to populate from a database, if you have the table already setup then you can do it from there or you can create your own list by clicking no – click on the arrow to the side of this option and populate the list:
Code – The value you want to sort by e.g. ‘January’.
Name – The value you want to display.
Sort Order – The list order, lowest number will be first.
Give the list a name at the top and click save. You’re all done, just need to make sure your sorting by this field in your report and that should do it.
Keep exploring! – Daniel

0 Comments
Submit a Comment

Your email address will not be published. Required fields are marked *