Category Archives

98 Articles

Updated: Annual radio countdown Top 2000 in Power BI

A bit later this year, but even after my move to the US I decided to keep up the tradition of updating my Power BI analysis of the Top 2000 analysis for this year.

Read all about it in the original post from 2016.

Full screen

Enjoy and happy holidays! See you next year.

Passing command line settings to SQL Server Integration Services (SSIS) packages using dtexec on Linux

This is my first blog post since I moved to Redmond. A lot of time has passed, sorry for that! I kept busy filling out forms, forms and some more forms. After that came more forms. I dream about forms, I breath forms. I am a form. Wait, let’s stop there.

Recently I had to figure out how to pass in settings to an SQL Server Integration Services (SSIS) package when calling it using dtexec from bash on Linux.

The dtexec utility is utility to execute a SSIS packages. The name goes back to the time that SSIS was called Data Transformation Services (DTS) – that is also the reason why SSIS packages carry the .dtsx extension. The dtexec utility is available for both Windows and Linux.

One of the interesting things you can do with dtexec is passing in values to variables (using the /Par(ameter) option or even change a connection string at runtime (using the /Conn[ection]). I had to do the latter. Here is where the fun started. The /Par and /Conn options (and maybe others) expect something like this: [name];[value]. For example:

dtexec /F myfile.dtsx /Conn "MasterSQL";"Data Source=myserver;User ID=myuser;Initial Catalog=master;Password=mypassword"

Notice the ‘;’ between the name of the source connection and the connection string. This is all great, unless you are trying to call dtexec from the bash command line in Linux, because ; actually means something in bash: when bash sees ; it thinks the current command has ended and the next instruction follows. That is not what we want here.

I had to escape a number of items to get this to work correct in bash:

/CONN "MasterSQL"\;"\"Data Source=myserver;User ID=myuser;Initial Catalog=mydb;Password=mypassword\""

See what I did there? I had to escape the first ; (between ‘MasterSQL’ and ‘Data Source’) as well as escape the quotes that surround the data source definition itself and have it double quoted.

If you need to pass in a value to a string parameter you need to follow the same logic:

/PAR "$Project::myparam"\;"\"myvalue\""

For a string variable you can pass in the value like this:

/SET "\\package.variables[myvariable].Value"\;"\"myvalue\""

Hope this helps!

Updated: Annual radio countdown Top 2000 in Power BI

This is starting to become a tradition, sort of. My Power BI analysis of the Top 2000 has been updated to include 2018’s edition!

Read all about it in the original post from 2016.

Full screen

Enjoy and happy holidays! See you next year.

Farewell Tour


DUTCH DATA DUDE
FAREWELL TOUR


A CHANGE IS GONNA COME
Na bijna 10 jaar waag ik de grote stap. Ik verhuis naar Amerika en ga voor Microsoft in Seattle aan de slag. Daarmee komt er een einde aan mijn werk als Dutch Data Dude in Nederland (en daarbuiten). Werk dat ik met veel passie heb gedaan en heb kunnen doen dankzij en met jullie. Om dit deel gepast af te sluiten doe ik een FAREWELL TOUR: ik klim nog een laatste keer op het podium. Bij jullie, voor jullie. Want jullie hebben mij in staat gesteld te worden wie ik wilde zijn: het geluid van Microsoft rondom data en Artificial Intelligence. Dutch Data Dude signs off.

DE TOUR

Tijdens de FAREWELL TOUR geef ik in korte tijd een flink aantal presentaties.
Dit organiseer ik samen met partners in October / November 2018. Het onderwerp van de presentaties is Business Intelligence, Big Data, Machine Learning of Artificial Intelligence. Soms staat mijn presentatie op zich, soms is het onderdeel van een groter geheel. Alles in samenspraak met de organiserende partner. Ik hoop je te mogen begroeten tijdens de FAREWELL TOUR.
DE LOCATIES

Hieronder staan de locaties die ik aandoe tijdens mijn FAREWELL TOUR. Voor publieke evenementen kun je je direct inschrijven via de aangegeven link.

DatumTijdPlaatsOrganisatieSoort evenementInschrijven
17 October10:00BussumCraniumConnectVoor ledenWebsite
17 October17:00Den HaagTopBIInternn.v.t.
18 October17:00AmsterdamQNHInternn.v.t.
23 October16:00AmsterdamDatafiedPubliekInschrijven
25 October18:00RotterdamMotion10PubliekInschrijven
29 October16:30EindhovenValidPubliekInschrijven
30 October13:30VeenendaalHSOOp uitnodigingWebsite
30 October16:00HuizenSigma Data ConsultingInternn.v.t.
31 October17:00VianenRubiconPubliekInschrijven
2 November09:00AmsterdamBreinwaveOp uitnodigingn.v.t.
6 November13:30VeenendaalHillstarPubliekInschrijven
7 November19:00VeenendaalInfosupportPubliek (beperkt aantal plaatsen)Inschrijven
8 November14:30HoofddorpMacawPubliekInschrijven
12 November13:30UtrechtAxiansInternn.v.t.
13 November17:30UtrechtCaesar ExpertsPubliekInschrijven
14 November10:00BussumCraniumConnectVoor ledenWebsite
14 November18:00VianenSogetiInternn.v.t.
15 November15:00AmsterdamIreckonuOp uitnodigingn.v.t.
29 November17:00Den BoschPower BI GebruikersgroepPubliekInschrijven

Power BI Connector for CBS Open Data / Statline updated

I have updated the instructions and the code for the Custom Connector for CBS Open Data / Statline. Please see the original post:

Power BI Connector for CBS Open Data / Statline

 

Ultimate Time Based Calculations Cheat Sheet for DAX / Power BI (including Week based calculations)

Power BI provides great time intelligence features to calculate Year-to-date (YTD), Month-to-date (MTD) and Quarter-to-date (QTD) totals. There is no such thing as Week-to-date (WTD) or Period-to-date (PTD) where period could be any arbitrary period definition (I used two-month periods in my example below). If you want those, you will have to create the calculations yourself. I was inspired by this excellent blog post and created an ultimate time-intelligence calculations Power BI file. I used Matt Massons excellent date dimension generation script to generate the date table for my example.

Download the full Power BI file here or get just the DAX formulas. Enjoy!

Basic Measures

  • Total Amount:
    TotalAmount = SUM(Sales[Amount])
  • Total Quantity:
    TotalQuantity = SUM(Sales[Quantity])

Day Measures

  • Total Amount for Last Day (Yesterday)
    Amount_LastDay = CALCULATE([TotalAmount],PREVIOUSDAY('Date'[Date]))
  • Total Amount for same Day last Year
    Amount_SameDayLastYear = CALCULATE([TotalAmount],SAMEPERIODLASTYEAR('Date'[Date]))
  • Variance of total Amount compared to Total Amount for Last Day
    Amount_DOD_Variance = [TotalAmount]-[Amount_LastDay]
  • Variance % of total Amount compared to Total Amount for Last Day
    Amount_DOD_Variance% = DIVIDE([Amount_DOD_Variance],[Amount_LastDay])
  • Variance of total Amount compared to Total Amount for same Day last Year
    Amount_YOY_Variance = [TotalAmount]-[Amount_SameDayLastYear]
  • Variance % of total Amount compared to Total Amount same Day last Year
    Amount_YOY_Variance% = DIVIDE([Amount_YOY_Variance],[Amount_LastDay])
  • Total Quantity for Last Day (Yesterday)
    Quantity_LastDay = CALCULATE([TotalQuantity],PREVIOUSDAY('Date'[Date]))
  • Total Quantity for same Day last Year
    Quantity_SameDayLastYear = CALCULATE([TotalQuantity],SAMEPERIODLASTYEAR('Date'[Date]))
  • Variance of total Quantity compared to Total Quantity for Last Day
    Quantity_DOD_Variance = [TotalQuantity]-[Quantity_LastDay]
  • Variance % of total Quantity compared to Total Quantity for Last Day
    Quantity_DOD_Variance% = DIVIDE([Quantity_DOD_Variance],[Quantity_LastDay])
  • Variance of total Quantity compared to total Quantity for same Day last Year
    Quantity_YOY_Variance = [TotalQuantity]-[Quantity_SameDayLastYear]
  • Variance % of total Quantity compared to total Quantity for same Day last Year
    Quantity_YOY_Variance% = DIVIDE([Quantity_YOY_Variance],[Quantity_LastDay])

Week Measures

  • Total Amount Week To Date
    Amount_WTD = IF (
        HASONEVALUE ( 'Date'[Year] )
            && HASONEVALUE ('Date'[WeekNumber] ), CALCULATE(
            [TotalAmount],
            FILTER (
                ALL ( 'Date' ),
                'Date'[Year] = VALUES ( 'Date'[Year] )
                    && 'Date'[WeekNumber] = VALUES ( 'Date'[WeekNumber] )
                    && 'Date'[Date] <= MAX ( 'Date'[Date] )
            )
        ))
  • Total Amount for Last Week
    Amount_LastWeek = SUMX(
        FILTER(ALL('Date'),
            IF(SELECTEDVALUE('Date'[WeekNumber])=1,
                'Date'[WeekNumber]=CALCULATE(MAX('Date'[WeekNumber]), ALL('Date')) && 'Date'[Year]=FORMAT(VALUE(SELECTEDVALUE('Date'[Year]))-1,""),
                'Date'[WeekNumber]=SELECTEDVALUE('Date'[WeekNumber])-1 && 'Date'[Year]=FORMAT(VALUE(SELECTEDVALUE('Date'[Year])),""))
        ),
        [TotalAmount])
  • Total Amount for same Week Last Year
    Amount_SameWeekLastYear = IF (
        HASONEVALUE ( 'Date'[Year] )
            && HASONEVALUE ('Date'[WeekNumber] ), CALCULATE(
            SUM ( Sales[Amount] ),
            FILTER (
                ALL ( 'Date' ),
                'Date'[Year] = FORMAT(VALUES ( 'Date'[Year] )-1,"")
                    && 'Date'[WeekNumber] = VALUES ( 'Date'[WeekNumber] )
                    && 'Date'[Date] <= MAX ( 'Date'[Date] )
            )
        ))
  • Variance of total Amount Week To Date compared to Total Amount for Last Week
    Amount_WTD_WOW_Variance = [Amount_WTD]-[Amount_LastWeek]
  • Variance % of total Amount Week To Date compared to Total Amount for Last Week
    Amount_WTD_WOW_Variance% = DIVIDE([Amount_WTD_WOW_Variance],[Amount_LastWeek])
  • Variance of total Amount Week to Date compared to Total Amount for same Week last Year
    Amount_WTD_YOY_Variance = [Amount_WTD]-[Amount_SameWeekLastYear]
  • Variance % of total Amount Week to Date compared to Total Amount for same Week last Year
    Amount_WTD_YOY_Variance% = DIVIDE([Amount_WTD_YOY_Variance],[Amount_SameWeekLastYear])
  • Total Quantity Week To Date
    Quantity_WTD = IF (
        HASONEVALUE ( 'Date'[Year] )
            && HASONEVALUE ('Date'[WeekNumber] ),
        CALCULATE (
            [TotalQuantity],
            FILTER (
                ALL ( 'Date' ),
                'Date'[Year] = VALUES ( 'Date'[Year] )
                    && 'Date'[WeekNumber] = VALUES ( 'Date'[WeekNumber] )
                    && 'Date'[Date] <= MAX ( 'Date'[Date] )
            )
        ),
        BLANK ()
    )
  • Total Quantity for same Week Last Year
    Quantity_SameWeekLastYear = IF (
        HASONEVALUE ( 'Date'[Year] )
            && HASONEVALUE ('Date'[WeekNumber] ), CALCULATE(
            SUM ( Sales[Quantity] ),
            FILTER (
                ALL ( 'Date' ),
                'Date'[Year] = FORMAT(VALUES ( 'Date'[Year] )-1,"")
                    && 'Date'[WeekNumber] = VALUES ( 'Date'[WeekNumber] )
                    && 'Date'[Date] <= MAX ( 'Date'[Date] )
            )
        ))
  • Total Quantity for Last Week
    Quantity_LastWeek = SUMX(
        FILTER(ALL('Date'),
            IF(SELECTEDVALUE('Date'[WeekNumber])=1,
                'Date'[WeekNumber]=CALCULATE(MAX('Date'[WeekNumber]), ALL('Date')) && 'Date'[Year]=FORMAT(VALUE(SELECTEDVALUE('Date'[Year]))-1,""),
                'Date'[WeekNumber]=SELECTEDVALUE('Date'[WeekNumber])-1 && 'Date'[Year]=FORMAT(VALUE(SELECTEDVALUE('Date'[Year])),""))
        ),
        [TotalQuantity])
  • Variance of total Quantity Week To Date compared to Total Quantity for Last Week
    Quantity_WTD_WOW_Variance = [Quantity_WTD]-[Quantity_LastWeek]
  • Variance % of total Quantity Week To Date compared to Total Quantity for Last Week
    Quantity_WTD_WOW_Variance% = DIVIDE([Quantity_WTD_WOW_Variance],[Quantity_LastWeek])
  • Variance of total Quantity Week to Date compared to Total Quantity for same Week last Year
    Quantity_WTD_YOY_Variance = [Quantity_WTD]-[Quantity_SameWeekLastYear]
  • Variance % of total Quantity Week to Date compared to Total Quantity for same Week last Year
    Quantity_WTD_YOY_Variance% = DIVIDE([Quantity_WTD_YOY_Variance],[Quantity_SameWeekLastYear])

Month Measures

  • Total Amount Month To Date
    Amount_MTD = TOTALMTD([TotalAmount],'Date'[Date])
  • Total Amount for same Month Last Year
    Amount_SameMonthLastYear = CALCULATE([Amount_MTD],SAMEPERIODLASTYEAR('Date'[Date]))
  • Total Amount for Last Month
    Amount_LastMonth = CALCULATE([TotalAmount],PREVIOUSMONTH('Date'[Date]))
  • Variance of total Amount Month To Date compared to Total Amount for Last Month
    Amount_MTD_MOM_Variance = [Amount_MTD]-[Amount_LastMonth]
  • Variance % of total Amount Month To Date compared to Total Amount for Last Month
    Amount_MTD_MOM_Variance% = DIVIDE([Amount_MTD_MOM_Variance],[Amount_LastMonth])
  • Variance of total Amount Month to Date compared to Total Amount for same Month last Year
    Amount_MTD_YOY_Variance = [Amount_MTD]-[Amount_SameMonthLastYear]
  • Variance % of total Amount Month to Date compared to Total Amount for same Month last Year
    Amount_MTD_YOY_Variance% = DIVIDE([Amount_MTD_YOY_Variance],[Amount_SameMonthLastYear])
  • Total Quantity Month To Date
    Quantity_MTD = TOTALMTD([TotalQuantity],'Date'[Date])
  • Total Quantity for same Month Last Year
    Quantity_SameMonthLastYear = CALCULATE([Quantity_MTD],SAMEPERIODLASTYEAR('Date'[Date]))
  • Total Quantity for Last Month
    Quantity_LastMonth = CALCULATE([TotalQuantity],PREVIOUSMONTH('Date'[Date]))
  • Variance of total Quantity Month To Date compared to Total Quantity for Last Month
    Quantity_MTD_MOM_Variance = [Quantity_MTD]-[Quantity_LastMonth]
  • Variance % of total Quantity Month To Date compared to Total Quantity for Last Month
    Quantity_MTD_MOM_Variance% = DIVIDE([Quantity_MTD_MOM_Variance],[Quantity_LastMonth])
  • Variance of total Quantity Month to Date compared to Total Quantity for same Month last Year
    Quantity_MTD_YOY_Variance = [Quantity_MTD]-[Quantity_SameMonthLastYear]
  • Variance % of total Quantity Month to Date compared to Total Quantity for same Month last Year
    Quantity_MTD_YOY_Variance% = DIVIDE([Quantity_MTD_YOY_Variance],[Quantity_SameMonthLastYear])

Period Measures

  • Total Amount Period To Date
    Amount_PTD = IF (
        HASONEVALUE ( 'Date'[Year] )
            && HASONEVALUE ('Date'[TwoMonthPeriod] ),
        CALCULATE (
            [TotalAmount],
            FILTER (
                ALL ( 'Date' ),
                'Date'[Year] = VALUES ( 'Date'[Year] )
                    && 'Date'[TwoMonthPeriod] = VALUES ( 'Date'[TwoMonthPeriod] )
                    && 'Date'[Date] <= MAX ( 'Date'[Date] )
            )
        ),
        BLANK ()
    )
  • Total Amount for same Period Last Year
    Amount_SamePeriodLastYear = CALCULATE([Amount_PTD],SAMEPERIODLASTYEAR('Date'[Date]))
  • Total Amount for Last Period
    Amount_LastPeriod = CALCULATE([TotalAmount],DATEADD('Date'[Date],-2,MONTH))
  • Variance of total Amount Period To Date compared to Total Amount for Last Period
    Amount_PTD_POP_Variance = [Amount_PTD]-[Amount_LastPeriod]
  • Variance % of total Amount Period To Date compared to Total Amount for Last Period
    Amount_PTD_POP_Variance% = DIVIDE([Amount_PTD_POP_Variance],[Amount_LastPeriod])
  • Variance of total Amount Period to Date compared to Total Amount for same Period last Year
    Amount_PTD_YOY_Variance = [Amount_PTD]-[Amount_SamePeriodLastYear]
  • Variance % of total Amount Period to Date compared to Total Amount for same Period last Year
    Amount_PTD_YOY_Variance% = DIVIDE([Amount_PTD_YOY_Variance],[Amount_SamePeriodLastYear])
  • Total Quantity Period To Date
    Quantity_PTD = IF (
        HASONEVALUE ( 'Date'[Year] )
            && HASONEVALUE ('Date'[TwoMonthPeriod] ),
        CALCULATE (
            [TotalQuantity],
            FILTER (
                ALL ( 'Date' ),
                'Date'[Year] = VALUES ( 'Date'[Year] )
                    && 'Date'[TwoMonthPeriod] = VALUES ( 'Date'[TwoMonthPeriod] )
                    && 'Date'[Date] <= MAX ( 'Date'[Date] )
            )
        ),
        BLANK ()
    )
  • Total Quantity for same Period Last Year
    Quantity_SamePeriodLastYear = CALCULATE([Quantity_PTD],SAMEPERIODLASTYEAR('Date'[Date]))
  • Total Quantity for Last Period
    Quantity_LastPeriod = CALCULATE([TotalQuantity],DATEADD('Date'[Date],-2,MONTH))
  • Variance of total Quantity Period To Date compared to Total Quantity for Last Period
    Quantity_PTD_POP_Variance = [Quantity_PTD]-[Quantity_LastPeriod]
  • Variance % of total Quantity Period To Date compared to Total Quantity for Last Period
    Quantity_PTD_POP_Variance% = DIVIDE([Quantity_PTD_POP_Variance],[Quantity_LastPeriod])
  • Variance % of total Quantity Period to Date compared to Total Quantity for same Period last Year
    Quantity_PTD_YOY_Variance = [Quantity_PTD]-[Quantity_SamePeriodLastYear]
  • Variance of total Quantity Period to Date compared to Total Quantity for same Period last Year
    Quantity_PTD_YOY_Variance% = DIVIDE([Quantity_PTD_YOY_Variance],[Quantity_SamePeriodLastYear])

Quarter Measures

  • Total Amount Quarter To Date
    Amount_QTD = TOTALQTD([TotalAmount],'Date'[Date])
  • Total Amount for same Quarter Last Year
    Amount_SameQuarterLastYear = CALCULATE([Amount_QTD],SAMEPERIODLASTYEAR('Date'[Date]))
  • Total Amount for Last Quarter
    Amount_LastQuarter = CALCULATE([TotalAmount],PREVIOUSQUARTER('Date'[Date]))
  • Variance of total Amount Quarter To Date compared to Total Amount for Last Quarter
    Amount_QTD_QOQ_Variance = [Amount_QTD]-[Amount_LastQuarter]
  • Variance % of total Amount Quarter To Date compared to Total Amount for Last Quarter
    Amount_QTD_QOQ_Variance% = DIVIDE([Amount_QTD_QOQ_Variance],[Amount_LastQuarter])
  • Variance of total Amount Quarter to Date compared to Total Amount for same Quarter last Year
    Amount_QTD_YOY_Variance = [Amount_QTD]-[Amount_SameQuarterLastYear]
  • Variance % of total Amount Quarter to Date compared to Total Amount for same Quarter last Year
    Amount_QTD_YOY_Variance% = DIVIDE([Amount_QTD_YOY_Variance],[Amount_SameQuarterLastYear])
  • Total Quantity Quarter To Date
    Quantity_QTD = TOTALQTD([TotalQuantity],'Date'[Date])
  • Total Quantity for same Quarter Last Year
    Quantity_SameQuarterLastYear = CALCULATE([Quantity_QTD],SAMEPERIODLASTYEAR('Date'[Date]))
  • Total Quantity for Last Quarter
    Quantity_LastQuarter = CALCULATE([TotalQuantity],PREVIOUSQUARTER('Date'[Date]))
  • Variance of total Quantity Quarter To Date compared to Total Quantity for Last Quarter
    Quantity_QTD_QOQ_Variance = [Quantity_QTD]-[Quantity_LastQuarter]
  • Variance % of total Quantity Quarter To Date compared to Total Quantity for Last Quarter
    Quantity_QTD_QOQ_Variance% = DIVIDE([Quantity_QTD_QOQ_Variance],[Quantity_LastQuarter])
  • Variance of total Quantity Quarter To Date compared to Total Quantity or same Quarter last Year
    Quantity_QTD_YOY_Variance = [Quantity_QTD]-[Quantity_SameQuarterLastYear]
  • Variance % of total Quantity Quarter To Date compared to Total Quantity for same Quarter last Year
    Quantity_QTD_YOY_Variance% = DIVIDE([Quantity_QTD_YOY_Variance],[Quantity_SameQuarterLastYear])

Year Measures

  • Total Amount Year To Date
    Amount_YTD = TOTALYTD([TotalAmount],'Date'[Date])
  • Total Amount for Last Year
    Amount_LastYear = CALCULATE([Amount_YTD],PREVIOUSYEAR('Date'[Date]))
  • Variance of total Amount Year To Date compared to Total Amount for Last Year
    Amount_YTD_YOY_Variance = [Amount_YTD]-[Amount_LastYear]
  • Variance% of total Amount Year To Date compared to Total Amount for Last Year
    Amount_YTD_YOY_Variance% = DIVIDE([Amount_YTD_YOY_Variance],[Amount_LastYear])
  • Total Quantity Year To Date
    Quantity_YTD = TOTALYTD([TotalQuantity],'Date'[Date])
  • Total Quantity for Last Year
    Quantity_LastYear = CALCULATE([TotalQuantity],PREVIOUSYEAR('Date'[Date]))
  • Variance of total Quantity Year To Date compared to Total Quantity for Last Year
    Quantity_YTD_YOY_Variance = -[Quantity_YTD]-[Quantity_LastYear]
  • Variance% of total Quantity Year To Date compared to Total Quantity for Last Year
    Quantity_YTD_YOY_Variance% = DIVIDE([Quantity_YTD_YOY_Variance],[Quantity_LastYear])

Mapping Dutch geographical data using Power BI

I have written before on the subject of using Power BIs mapping capabilities (see the post on ArcGIS) and using the maps with Dutch geographical data (see using Dutch postal codes in Power Map). However, I have never did a more thorough exploration of the mapping capabilities of Power BI using Dutch data. Until now! (Niels, thanks for requesting me to do this).

Please see the Power BI report below – the first tab shows the dataset I used. The other tabs show the way(s) to work with the various maps to plot Dutch data. Unfortunately the ArcGIS visual is not supported in the mode I use here – please download the original Power BI desktop file below. Enjoy!

Download Power BI Desktop file

Updated: Annual radio countdown Top 2000 in Power BI

Oops, I did it again. It’s that time of the year. A day later than last year (sorry about that ;))….

Back by popular demand: the Top 2000 visualized in Power BI. Read all about it in last year’s post.

Full screen

Enjoy and happy holidays! See you next year.

SQL Server 2017: It’s here!

Anxiously you have waited for this day. The day you could finally get your hands on the latest version of the best database platform available. Today is that day. SQL Server 2017 is available and it runs on Windows, Linux and Docker. Find more info here: https://www.microsoft.com/en-us/sql-server/sql-server-2017. What changed? So many things it is hard to mention them all. Have a look at the Ignite sessions to get a feel for what happened.

 

Power BI Connector for CBS Open Data / Statline

Updated 7/10/2018: path updated below and new file on GitHub.

Since this post primarily concerns a Dutch data source, the rest of this post will be in Dutch. English summary below.

De open data die het Centraal Bureau voor de Statistiek (CBS) via Statline (http://statline.cbs.nl) aanlevert is van onschatbare waarde voor analisten. Over diverse thema’s wordt informatie gepubliceerd, zoals woning, demografie, inkomen en arbeid. Erg handig om je verkopen per provincie te vergelijken met de samenstelling van de bevolking bijvoorbeeld. De juiste informatie uit Statline halen was erg lastig, maar dankzij de Power BI Connector voor CBS Open Data / Statline is dat niet meer het geval.

Gebruik

Wanneer je de connector hebt geïnstalleerd (zie beneden) vind je de connector in de lijst met data bronnen in Power BI Desktop:

Klik op CBSOpenData en klik Connect. Vul één of meerdere zoekwoorden in (bijvoorbeeld arbeid) en klik OK:

De connector communiceert met de CBS Statline website en levert de thema’s en eventueel bijbehorende tabellen. Dit kan een tijdje duren, afhankelijk van het aantal thema’s en tabellen die horen bij de woorden die je ingevoerd hebt. Kies één of meerdere tabellen en je kunt ze laten of bewerken! Eenvoudiger wordt het niet!

Installatie

Omdat de custom connectors nog erg nieuw zijn is er op dit moment een omweg nodig om ze te kunnen gebruiken in Power BI Desktop. Volg deze stappen:

  1. Zet de Custom data connectors preview feature aan binnen Power BI Desktop via File à Options:

  2. Sluit Power BI Desktop.
  3. Lees de documentatie op Github om te zien welke directory je moet maken om Power BI de custom connectors te laten laden. Op dit moment is dat [My Documents]\Power BI Desktop\Custom Connectors.
  4. Download het .mez bestand van de Github van de CBS Open Data connector en sla het bestand op in de directory die je net gemaakt hebt. Je kunt natuurlijk ook de source code helemaal bekijken.
  5. Start Power BI Desktop op. Als het goed is staat de connector nu onder ‘Other’ in de lijst (zie screenshot bovenaan in deze post). De snelheid van ophalen is niet hoog, omdat er gebruik wordt gemaakt van de publieke API, maar toch, met wat geduld moet het werken. Veel succes!

English

The CBS Open Data / Statline website (http://statline.cbs.nl) is a very popular source of all types of statistical information about the Netherlands, provided by the government. In order to use this connector in Power BI, download the .mez file from Github and save the file in your custom connectors directory. Please see the documentation to find which directory to use. Enable the Custom Connectors preview feature in Power BI Desktop, restart Power BI and the connector should show up. You can of course also look at the source code on Github. Enjoy!

%d bloggers like this: