Time Hierarchies Do Not Show on X Axis and Category Axis for External Data Tables

Time Hierarchies Do Not Show on X Axis and Category Axis for External Data Tables

book

Article ID: KB0081579

calendar_today

Updated On:

Products Versions
Spotfire Analyst All Versions

Description

When your data table is kept external (in an SQL database), and when you try to add TIME columns on the X Axis or Category Axis of a visualization, you will find that time hierarchies are not available for such columns. See the screenshot below for an example.
User-added image
But if the data table is imported into the analysis file, time hierarchies will show up. See the screenshot below for a comparison.
User-added image

Issue/Introduction

Time Hierarchies Does Not Show on X Axis and Category Axis for External Data Tables

Resolution

This behavior is by design. The only possible workaround to have a slider on the X Axis or Category Axis would be to manually create the hierarchy first from Insert > Hierarchy, and then select that new Hierarchy on your X Axis or Category Axis

The custom expression for a column with time hierarchy slider is something like below. Since "BinByDateTime" is not a supported function in SQL, manually typing in the same custom expression for an external data table will not work:
 BinByDateTime([DATE_JOINED],"Year.Quarter.Month",1) 

If a slider is not required, you can also use a custom expression like: 

 <Year([DATE_JOINED]) NEST Month([DATE_JOINED])>

Additional Information

Doc: Working with In-Database Data