Power QueryExercises

European invoices (semicolon CSV)

A German-format invoice export: semicolons between fields, day.month.year dates and decimal commas. The classic locale trap.

beginner · Skills: Delimiter choice, Locale-aware types (de-DE), Calculated columns · Updated 2026-11-04

Data files

  • rechnungen.csv — 14 invoices: Rechnungsnr, Datum (dd.mm.yyyy), Kunde, Netto (1.234,56), MwSt (VAT % as 19 or 7).Download CSV (791 B)

Queries

Validated in the Power Query Exercises simulator against the files above. Paste them into Excel or Power BI yourself; the header comments explain each source binding.

Invoices with gross amounts invoices-typed.pq

Download .pq

Reads the semicolon file, types it with the de-DE culture and adds VAT and gross amounts. Returns 14 rows: Rechnungsnr, Datum, Kunde, Netto, MwSt, VAT, Gross.

// Invoices with gross amounts
// Pack: European invoices (semicolon CSV) (Power Query Exercises, https://powerqueryexercises.com/downloads/european-invoices-semicolon)
//
// Source bindings
// In the Power Query Exercises simulator each name below is bound directly to a pack file. In Excel or
// Power BI Desktop the first steps of this query do that binding instead:
//   Invoices       the pack file rechnungen.csv -> File.Contents(PackFolder & "rechnungen.csv")
// Set PackFolder to the folder where you extracted the pack (keep the trailing backslash).
//
// Validated in the Power Query Exercises simulator (engine 0.1.0) against this pack's files; it returns
// 14 rows with columns Rechnungsnr, Datum, Kunde, Netto, MwSt, VAT, Gross.
// It has not been run in Excel or Power BI by us. This is query text, not a ready-to-refresh workbook.
// Independent practice material; not affiliated with or endorsed by Microsoft.
let
    PackFolder = "C:\PQE\european-invoices-semicolon\",
    Invoices = File.Contents(PackFolder & "rechnungen.csv"),
Source = Csv.Document(Invoices, [Delimiter=";", Encoding=65001, QuoteStyle=QuoteStyle.Csv]),
    #"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true]),
    #"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers", {{"Datum", type date}, {"Netto", type number}, {"MwSt", Int64.Type}}, "de-DE"),
    #"VAT" = Table.AddColumn(#"Changed Type", "VAT", each Number.Round([Netto] * [MwSt] / 100, 2), type number),
    #"Gross" = Table.AddColumn(#"VAT", "Gross", each [Netto] + [VAT], type number)
in
    #"Gross"

Follow along in a host

Follow along in Excel

  1. Download the pack and extract the zip, for example to C:\PQE\<pack name>\.
  2. In Excel (Microsoft 365 or 2016+ on Windows), go to Data → Get Data → From Other Sources → Blank Query.
  3. In the Power Query Editor choose Home → Advanced Editor, select everything and paste the contents of the .pq file.
  4. Change the PackFolder line to the folder you extracted to, then choose Done.
  5. If Excel asks about privacy levels or file access, allow access to that folder. Then choose Home → Close & Load.

Follow along in Power BI Desktop

  1. Download the pack and extract the zip.
  2. In Power BI Desktop choose Home → Transform data to open the Power Query Editor, then Home → New Source → Blank Query.
  3. Choose Home → Advanced Editor, paste the contents of the .pq file and change the PackFolder line to your folder.
  4. Choose Done, check the preview against the expected rows in the query header, then Close & Apply.

Then try this

  1. Change the culture argument from "de-DE" to "en-US" and watch Datum and Netto fail or change meaning, then change it back.
  2. In Excel, check File → Options → Data so new queries don't guess types from the first rows.

Related lessons

Original fictional data, free to use for learning and teaching. Power Query Exercises is not affiliated with or endorsed by Microsoft.