Expression plot dividends per year

plot_dividends_per_year.expr

#
# Plot number of dividends by year for all active titles in a report.
#---
$REPORT = IF($REPORT, $REPORT, '300K')
#---

// Get report active titles
$titles = FILTER(R($REPORT, active), $2)

// Map NumberDividendsByYear by titles
$titles = MAP($titles, [$1, F($1, "SplitsDividends.NumberDividendsByYear")])

// Remove titles with no dividends data
$titles = FILTER($titles, IF($2, true, false))

// Extract only needed data
$titles = MAP($titles, [$1, MAP($2, MAP($2, $2))])

MAP($titles, PLOT('Number Dividends By Year#' + $1, MAP($2, $1), MAP($2, $2)))

Download