Deneb/Vega-Lite can be used to create linked charts in Power BI. The example visual presented herein consists of a scatter chart concatenated (horizontally) with a table, and displays football player statistics from the English Premier League for the 2022-2023 season. Of those players (interactively) selected in the scatter chart, selected statistics for the top 20 are shown in the table, with the leaders highlighted.
This example illustrates a number of Deneb/Vega-Lite features, including:
0 - General:
- use of a “transform” block to filter (reduce) the dataset to just those players with 5 or more goals and whose playtime averaged 45 minutes or greater
- use of a “params” block to create an in-visual variable for the highlight colour
- use of a “vconcat” block consisting of 2 sections: divider, and “hconcat” (containing the scatter chart and table)
1 - Divider:
- use of a dedicated “data” block (single in-visual record)
- use of a “rule” mark to display a full-width grey horizontal line
2 - Scatter Chart:
- use of a dedicated “title” block
- use of a “point” mark to display goals vs. average minutes
- both the X and Y axes use custom ranges and visible grid lines
- use of 2 marks in a “layer” block:
- a “point” mark for the symbol:
- use of an interval (area) brush to select the player(s) of interest
- interval selection can be panned (mouse drag) or zoomed (CTRL-mouse drag)
- colour and shape by player position, with horizontal legend at bottom-left
- custom tooltip with player, team, minutes, goals, shots, offsides, yellows, and assists
- use of an interval (area) brush to select the player(s) of interest
- a “text” mark for the player name
- a “point” mark for the symbol:
3 - Top 20 Table:
- use of a “transform” block
- to filter the table dataset to the top 20 players selected with the brush in the scatter chart (above)
- to rank the sele the players by goals, shots, offsides, yellows, assists, and average minutes
- to change the shape of the (filtered) dataset using the “fold” transform (tabular by goals, shots, offsides, yellows, assists, and average minutes)
- use of 2 marks in a “layer” block:
- a “rect” mark for the cell rectangle with conditional colours to highlight those record(s) ranked #1 in each statistic while displaying all others in grey
- a “text” mark for the statistic value
The intent of this example is not to provide a finished visual, but rather to serve as a starting point for further custom visual development.
Also included is the sample PBIX using public football data from the English Premier League for the 2022-2023 season.
This example is provided as-is for information purposes only, and its use is solely at the discretion of the end user; no responsibility is assumed by the author.
Greg
Deneb Examples - Linked Charts - Scatter and Top 20 Table - V2.pbix (1.4 MB)