Side-by-side Bar Charts - Column mapping
Example
Summary of settings
- Type of chart: Bars
- Mapping of "y" attribute: City
- Mapping of "x" attribute: Volume
- Filters: Two historical dates selected
- Common attributes → "Columns" mapped to AsOfDate dimension
Step-by-step instruction
Add new Chart Widget
Select "Bars"
If there are multiple cubes connected to your application, you must select the cube you want for the chart.
To map the "y" attribute, select the groups you would like to see on vertical axes, in this case City.
To map the "x" attribute, select the value (measure) corresponding to horizontal axes, Volume
The chart displays with axes mapped:
To produce multiple bar charts for each member of some dimension of interest in order to see levels for two consecutive dates, click Options in the Legend area of the chart:
In the Options popup, find attribute "Columns" and map it to the desired dimension.
Apply a filter to view only the two dates needed (see Filters)
The chart is complete:
Back to Chart Gallery
Appendix
The appendix contains code snippets for advanced users.
MDX:
SELECT
NON EMPTY Crossjoin(
[Geography].[City].[City].Members,
[Time].[HistoricalDates].[AsOfDate].Members
) ON ROWS,
NON EMPTY [Measures].[Volumes] ON COLUMNS
FROM (
SELECT
{
[Time].[HistoricalDates].[AsOfDate].[2018-05-07],
[Time].[HistoricalDates].[AsOfDate].[2018-05-08]
} ON COLUMNS
FROM [EquityDerivativesCube]
)
JSON:
{
"configurations": [
{
"handlers": {
/* ... */
},
"type": "combo-horizontal-histogram",
"mapping": {
"y": {
"from": ["[Geography].[City].[City]"]
},
"x": {
"from": "Value"
},
"column": {
"from": ["[Time].[HistoricalDates].[AsOfDate]"]
},
"split": {
"from": ["numeric"],
"numericMembers": ["[Measures].[Volumes]"]
}
},
"legend": {
"display": "hidden"
}
}
]
}