SparklineData

EAZYBI Provides a JSON result that can be used with eazyBI Sparkline formatter.

Available starting from the eazyBI version 6.2.

Syntax

SparklineData( Set_Expression , Numeric_Expression )

Arguments

Set_Expression  MDX expression that returns a set over which to draw sparkline. Not mandatory for Sparkline bar.
Numeric_Expression  MDX expression that returns a number

Examples

Starting eazyBI version 6.2 and on Cloud, it is possible to add Sparklines to Table and Gauge charts. See examples in Issues created vs resolved by priority in our demo account. This can be done with standard calculations or by manually writing a formula to return SparklineData.

  • The following formula could be formatted like a bar to show the difference between the measure on different rows visually:
SparklineData([Measures].[Issues resolved] -- only numeric expression)
  • Similarly, the Issues resolved trend can be put in a sparkline over a period of time:
SparklineData(
-- set of last 4 months counting from current month
  LastPeriods(4,
    [Time].[Month].CurrentDateMember
  ), 
-- numeric expression
  [Measures].[Issues resolved]
)

The returned result by default would be the JSON, similar to the following.

[{"name":"Jan 2020","value":16.0,"formatted_value":"16"},{"name":"Feb 2020","value":8.0,"formatted_value":"8"},{"name":"Mar 2020","value":10.0,"formatted_value":"10"},{"name":"Apr 2020","value":9.0,"formatted_value":"9"}]

When you have double-checked that it is the correct data set, you can choose from Sparkline formatting options to display results.

See also

See more details about