GapMinder data presented in Power BI

Power BI can display a dynamic time-series scatter chart like this original by Gapminder and then further explore the data by selected regions.

Here is the live version in Power BI Service where you can ‘play’ the time axis (button at bottom left). To select multiple Regions use Ctrl-click in the other pages.

This snapshot is for a single year 2015: GapMinder_screenshot_for_2015 (downloaded from here)

Why is this interesting?

In their book ‘Factfulness’ the Roslings write that the world is not as bad as it seems and there is more improvement than people usually perceive. They use data to correct pessimism and unfounded explanations.

For example, why are Cuba and the USA outliers in the health and wealth charts? Cuba is the poorest of the healthy countries and the USA is the sickest of the rich countries.

The main purpose of Power BI is to present data in a persuasive way, to inform good quality decisions and actions.

Technical notes on using Power BI

The data model in Power BI is quite simple: the two dimension tables are used to filter the one fact table. Power BI_data_model_screenshot

The DAX calculations needed some care: the data are measurements taken over time (year to year) and so they are not additive. They can only be aggregated in a given year (using SELECTEDVALUE) and calculating weighted averages, not sums or means. For example:

    DIVIDE (
        SUMX ( AnnualData, AnnualData[Income] * AnnualData[Population] ),
        SUM ( AnnualData[Population] ),
    FILTER ( Years, Years[Year] = SELECTEDVALUE ( Years[Year] ) )

Wt.Avg. GDP/Lifespan = CALCULATE (
    DIVIDE ( AnnualData[Wt.Avg. GDP], AnnualData[Wt.Avg. Lifespan], 0 ),
    FILTER ( 'list-of-countries-etc',
        'list-of-countries-etc'[Region] = SELECTEDVALUE ( 'list-of-countries-etc'[Region] )

For more information on Data Models and DAX for ‘snapshots of time-series data’ see chapter 6 in Analyzing Data with Power BI and Power Pivot for Excel, 2017 by Alberto Ferrari and Marco Russo.

The menu on the front page (and the return Home buttons) use Bookmarks. The Regional slicers are synchronised across several charts. The population chart uses a custom visual ‘HierarchySlicer’ for selection of Regions or Countries.

Return to:

Other Power BI samples