Date Posted:
Product: TIBCO Spotfire®
Product: TIBCO Spotfire®
Problem:
How to show numbers instead of strings for axis labels when using date column on x-axis
Solution:
When using a column of type "Date" for the X-axis in a visualization (for example a bar chart), and setting the X-axis to be Year > Month hierarchy, the X-axis labels for months will be strings, e.g. Jan, Feb, etc. An example of this is shown below.
How to change the month labels from strings to numbers?
A simple solution is to use Date() function on the X-axis, to the existing custom expression to instead show the lables like "1/1/2020", "2/1/2020", etc.
For the example above, the expression used on the X-axis is:
- BinByDateTime([Date],"Year.Month",1)
- Date(BinByDateTime([Date],"Year.Month",1))
Comments
0 comments
Article is closed for comments.