Time Dimensions are everywhere. It is highly possible that
you are recording time dimension with every data point you are capturing. Every business pretty much uses the time
dimension in some way or the other.
Some patterns in time are easy to guess and you don’t need
analytics for that.e.g. What day of week do I see more customers walk into my
store? Easy to guess. What months of the year I will sell spike in gifts items?
Easy to guess, isn’t it?
But what if you didn’t know the pattern and want a quick and
easy way to shuffle between time dimensions to find that insight from all the
data you captured?
Wouldn’t it be great for a Spotfire user to have flexibility
to see data aggregated at different levels like “Hour of the day”, “Daily”,
“Monthly”, “Day of Week”.
Good news is Spotfire provides all these calculations in
single click for a column whose Datatype is date. Each Date field you can
decide how you want to display the time dimension. These are options you can
chose from on any axis when using Date Column.
Selecting this will show the user data aggregated at the
levels you chose.
However in this case we would like to provide the user a way
to switch between some of these levels in a click.
Spotfire text areas used to build guided analytics and give
a story to your data comes in handy here. Using the amazing text areas and a
simple property control, you can provide end user quick access to switch
between different time dimensions.
The setup would look like described below.
Create a new Property Control of the type “Drop Down List”.
Map it to a property of type String, let’s call it “myDateProp”.
In “Set property values through” drop down selection use
“Fixed Values”
The add the expressions like below
Let’s assume your date column is named “MyDateColumn”.
Let’s assume your date column is named “MyDateColumn”.
Year <BinByDateTime([MyDateColumn],"Year",0)>
Month <BinByDateTime([MyDateColumn],"Month",0)>
Daily <BinByDateTime([MyDateColumn],"DayOfMonth",0)>
Hourly <BinByDateTime([MyDateColumn],"Hour",0)>
Day of Week <BinByDateTime([MyDateColumn],"DayOfWeek",0)>
Hour of Day <BinByDateTime([MyDateColumn],"Hour",0)>
Close the edit mode and then on the axis you would like to
change with this drop down value just set to express ${myDateProp}.
And this is how you provide users a quick ability to
aggregate data across various time dimensions.
Comments
Post a Comment