Creating Sparklines
Creating
Sparklines
The example uses the Superstore sample to create a sparkline
that shows sales and profit for various product categories over a long period.
Create the View
1.
From the Dimensions pane,
drag Order
Date to the Columns shelf
1.
On the Columns shelf,
right-click Order
Date and select the second instance of Day
Alternatively, if you want to view the profits over four years on a continuous
axis, select the second instance of Month.
2.
From the Dimensions pane,
drag Category and Segment to
the Rows shelf
3.
From the Measures pane,
drag Sales to
the Rows shelf
4.
On the Columns shelf, right-click Month and uncheck Show Header
5.
On the Rows shelf, right-click Sales and
uncheck Show
Header
Optional: Add a Text Column for a Measure
1.
Select Analysis > Create Calculated Field
2.
In the Calculated Field dialog box that opens, do the following,
and then click OK:
1.
Name the calculated field. In this example, the calculated field
is named "Profit per Category per Segment"
2.
In the formula field, create a calculation similar to the
following:
3.
{ EXCLUDE DATETRUNC('day', [Order Date]), [Segment] :
SUM([Profit]) }
3.
Right-click Profit per Category per
Segment in the data pane, and select Convert
to Discrete
4.
Drag Profit per Category per
Segment to the Rows shelf
Comments
Post a Comment