100% found this document useful (15 votes)
56 views

Download Complete Data Mashup with Microsoft Excel Using Power Query and M: Finding, Transforming, and Loading Data from External Sources Adam Aspin PDF for All Chapters

Data

Uploaded by

colinamouad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (15 votes)
56 views

Download Complete Data Mashup with Microsoft Excel Using Power Query and M: Finding, Transforming, and Loading Data from External Sources Adam Aspin PDF for All Chapters

Data

Uploaded by

colinamouad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 55

Experience Seamless Full Ebook Downloads for Every Genre at textbookfull.

com

Data Mashup with Microsoft Excel Using Power Query


and M: Finding, Transforming, and Loading Data
from External Sources Adam Aspin

https://textbookfull.com/product/data-mashup-with-microsoft-
excel-using-power-query-and-m-finding-transforming-and-
loading-data-from-external-sources-adam-aspin/

OR CLICK BUTTON

DOWNLOAD NOW

Explore and download more ebook at https://textbookfull.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

Data Visualization in Excel 2016 Adam Aspin

https://textbookfull.com/product/data-visualization-in-
excel-2016-adam-aspin/

textboxfull.com

Biota Grow 2C gather 2C cook Loucas

https://textbookfull.com/product/biota-grow-2c-gather-2c-cook-loucas/

textboxfull.com

Analyzing Data with Microsoft Power BI and Power Pivot for


Excel 1st Edition Alberto Ferrari & Marco Russo

https://textbookfull.com/product/analyzing-data-with-microsoft-power-
bi-and-power-pivot-for-excel-1st-edition-alberto-ferrari-marco-russo/

textboxfull.com

Pro Power BI Desktop: Self-service Analytics and Data


Visualization for the Power User 3rd Edition Adam Aspin

https://textbookfull.com/product/pro-power-bi-desktop-self-service-
analytics-and-data-visualization-for-the-power-user-3rd-edition-adam-
aspin/
textboxfull.com
Pro Power BI Desktop Self Service Analytics and Data
Visualization for the Power User Third Edition Adam Aspin

https://textbookfull.com/product/pro-power-bi-desktop-self-service-
analytics-and-data-visualization-for-the-power-user-third-edition-
adam-aspin/
textboxfull.com

Learning Apache Drill Query and Analyze Distributed Data


Sources with SQL 1st Edition Charles Givre

https://textbookfull.com/product/learning-apache-drill-query-and-
analyze-distributed-data-sources-with-sql-1st-edition-charles-givre/

textboxfull.com

Data Analysis with Microsoft Power Bi Brian Larson

https://textbookfull.com/product/data-analysis-with-microsoft-power-
bi-brian-larson/

textboxfull.com

Targeting Using Augmented Data in Database Marketing


Decision Factors for Evaluating External Sources 1st
Edition Bettina Hüttenrauch
https://textbookfull.com/product/targeting-using-augmented-data-in-
database-marketing-decision-factors-for-evaluating-external-
sources-1st-edition-bettina-huttenrauch/
textboxfull.com

Microsoft Excel Data Analysis and Business Modeling 5th


Edition Wayne Winston

https://textbookfull.com/product/microsoft-excel-data-analysis-and-
business-modeling-5th-edition-wayne-winston/

textboxfull.com
Data Mashup
with Microsof t
Excel Using Power
Query and M
Finding, Transforming, and Loading Data
from External Sources

Adam Aspin
Data Mashup with
Microsoft Excel Using
Power Query and M
Finding, Transforming, and
Loading Data from
External Sources

Adam Aspin
Data Mashup with Microsoft Excel Using Power Query and M: Finding,
Transforming, and Loading Data from External Sources
Adam Aspin
Stafford, UK

ISBN-13 (pbk): 978-1-4842-6017-3 ISBN-13 (electronic): 978-1-4842-6018-0


https://doi.org/10.1007/978-1-4842-6018-0

Copyright © 2020 by Adam Aspin


This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the
material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation,
broadcasting, reproduction on microfilms or in any other physical way, and transmission or information
storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now
known or hereafter developed.
Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with
every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an
editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the
trademark.
The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not
identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to
proprietary rights.
While the advice and information in this book are believed to be true and accurate at the date of publication,
neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or
omissions that may be made. The publisher makes no warranty, express or implied, with respect to the
material contained herein.
Managing Director, Apress Media LLC: Welmoed Spahr
Acquisitions Editor: Jonathan Gennick
Development Editor: Laura Berendson
Coordinating Editor: Jill Balzano
Cover image designed by Freepik (www.freepik.com)
Distributed to the book trade worldwide by Springer Science+Business Media New York, 233 Spring Street,
6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-ny@springer-
sbm.com, or visit www.springeronline.com. Apress Media, LLC is a California LLC and the sole member
(owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a
Delaware corporation.
For information on translations, please e-mail rights@apress.com, or visit http://www.apress.com/
rights-permissions.
Apress titles may be purchased in bulk for academic, corporate, or promotional use. eBook versions and
licenses are also available for most titles. For more information, reference our Print and eBook Bulk Sales
web page at http://www.apress.com/bulk-sales.
Any source code or other supplementary material referenced by the author in this book is available to
readers on GitHub via the book’s product page, located at www.apress.com/9781484260173. For more
detailed information, please visit http://www.apress.com/source-code.
Printed on acid-free paper
Table of Contents
About the Author��������������������������������������������������������������������������������������������������� xiii

About the Technical Reviewer���������������������������������������������������������������������������������xv


Acknowledgments�������������������������������������������������������������������������������������������������xvii

Introduction������������������������������������������������������������������������������������������������������������xix

Chapter 1: Using Power Query to Discover and Load Data into Excel���������������������� 1
Power Query��������������������������������������������������������������������������������������������������������������������������������� 2
The Data Load Process����������������������������������������������������������������������������������������������������������������� 4
Why Use Power Query?����������������������������������������������������������������������������������������������������������������� 7
The Queries & Connections Pane�������������������������������������������������������������������������������������������������� 8
Displaying the Queries & Connections Pane���������������������������������������������������������������������������� 9
The Peek Window�������������������������������������������������������������������������������������������������������������������� 9
Peek Window Options������������������������������������������������������������������������������������������������������������ 10
View in Worksheet����������������������������������������������������������������������������������������������������������������� 11
Deleting a Query������������������������������������������������������������������������������������������������������������������������� 12
Understanding Data Load������������������������������������������������������������������������������������������������������������ 12
The Navigator Dialog������������������������������������������������������������������������������������������������������������� 13
Select Multiple Source Tables����������������������������������������������������������������������������������������������� 15
Searching for Datasets���������������������������������������������������������������������������������������������������������� 15
Navigator Display Options����������������������������������������������������������������������������������������������������� 17
Refresh���������������������������������������������������������������������������������������������������������������������������������� 17
The Navigator Data Preview�������������������������������������������������������������������������������������������������� 18
Modifying Data���������������������������������������������������������������������������������������������������������������������� 19
The Power Query Editor�������������������������������������������������������������������������������������������������������������� 20
Data Sources������������������������������������������������������������������������������������������������������������������������������� 20

iii
Table of Contents

Source Data Properties��������������������������������������������������������������������������������������������������������������� 22


Query Properties������������������������������������������������������������������������������������������������������������������������� 23
Load Destinations����������������������������������������������������������������������������������������������������������������������� 25
Repurposing an Existing Connection������������������������������������������������������������������������������������� 26
Load to Excel������������������������������������������������������������������������������������������������������������������������� 28
Load to the Data Model��������������������������������������������������������������������������������������������������������� 28
Conclusion���������������������������������������������������������������������������������������������������������������������������������� 30

Chapter 2: Discovering and Loading File-Based Data with Power Query��������������� 31


File Sources�������������������������������������������������������������������������������������������������������������������������������� 31
Loading Data from Files�������������������������������������������������������������������������������������������������������������� 33
CSV Files�������������������������������������������������������������������������������������������������������������������������������� 33
Text Files������������������������������������������������������������������������������������������������������������������������������� 37
Text and CSV Options������������������������������������������������������������������������������������������������������������� 38
Fixed-Width Text Files����������������������������������������������������������������������������������������������������������� 40
Simple XML Files������������������������������������������������������������������������������������������������������������������� 41
Excel Files����������������������������������������������������������������������������������������������������������������������������� 43
Why Use Power Query to Connect to Excel��������������������������������������������������������������������������� 47
From Table/Range������������������������������������������������������������������������������������������������������������������ 48
Microsoft Access Databases������������������������������������������������������������������������������������������������� 49
JSON Files����������������������������������������������������������������������������������������������������������������������������������� 51
Conclusion���������������������������������������������������������������������������������������������������������������������������������� 51

Chapter 3: Loading Data from Databases and Data Warehouses��������������������������� 53


Relational Databases������������������������������������������������������������������������������������������������������������������ 54
SQL Server���������������������������������������������������������������������������������������������������������������������������������� 56
Automatically Loading Related Tables����������������������������������������������������������������������������������� 60
Database Options������������������������������������������������������������������������������������������������������������������ 61
Searching for Tables�������������������������������������������������������������������������������������������������������������� 64
Oracle Databases������������������������������������������������������������������������������������������������������������������������ 71
Other Relational Databases��������������������������������������������������������������������������������������������������������� 74

iv
Table of Contents

Microsoft SQL Server Analysis Services Data Sources��������������������������������������������������������������� 76


From Analysis Services��������������������������������������������������������������������������������������������������������� 80
SSAS Tabular Data Warehouses�������������������������������������������������������������������������������������������������� 83
Types of Credentials When Connecting��������������������������������������������������������������������������������������� 87
Unable to Connect����������������������������������������������������������������������������������������������������������������������� 87
Other Database Connections������������������������������������������������������������������������������������������������������� 88
Conclusion���������������������������������������������������������������������������������������������������������������������������������� 88

Chapter 4: Loading Data from the Web and the Cloud�������������������������������������������� 89


Web and Cloud Services������������������������������������������������������������������������������������������������������������� 89
Web Pages����������������������������������������������������������������������������������������������������������������������������� 90
Online Services���������������������������������������������������������������������������������������������������������������������� 90
Microsoft Azure��������������������������������������������������������������������������������������������������������������������� 91
Web Pages���������������������������������������������������������������������������������������������������������������������������������� 91
Advanced Web Options���������������������������������������������������������������������������������������������������������� 93
Viewing the Source Web Page����������������������������������������������������������������������������������������������� 94
Salesforce����������������������������������������������������������������������������������������������������������������������������������� 95
Loading Data from Salesforce Objects���������������������������������������������������������������������������������� 96
Salesforce Reports�������������������������������������������������������������������������������������������������������������� 102
Microsoft Dynamics 365����������������������������������������������������������������������������������������������������������� 102
Azure SQL Database������������������������������������������������������������������������������������������������������������������ 104
Azure SQL Data Warehouse (Azure Synapse Analytics)������������������������������������������������������������ 106
Connecting to SQL Server on an Azure Virtual Machine����������������������������������������������������������� 108
Azure Blob Storage������������������������������������������������������������������������������������������������������������������� 110
Azure Security��������������������������������������������������������������������������������������������������������������������������� 112
Other Source Types������������������������������������������������������������������������������������������������������������������� 113
Conclusion�������������������������������������������������������������������������������������������������������������������������������� 114

Chapter 5: Generic Data Sources�������������������������������������������������������������������������� 115


ODBC Sources��������������������������������������������������������������������������������������������������������������������������� 116
OLE DB Data Sources���������������������������������������������������������������������������������������������������������������� 125

v
Table of Contents

OData Feeds������������������������������������������������������������������������������������������������������������������������������ 129


OData Options���������������������������������������������������������������������������������������������������������������������� 132
Refreshing Data������������������������������������������������������������������������������������������������������������������������ 132
Refreshing the Entire Data in the Excel In-Memory Model�������������������������������������������������� 133
Refreshing an Individual Query������������������������������������������������������������������������������������������� 133
Conclusion�������������������������������������������������������������������������������������������������������������������������������� 134

Chapter 6: Structuring Imported Data������������������������������������������������������������������ 135


Extending Queries in Power Query������������������������������������������������������������������������������������������� 136
Editing Data After a Data Load��������������������������������������������������������������������������������������������� 137
Transforming Data Before Loading�������������������������������������������������������������������������������������� 141
Query or Load?�������������������������������������������������������������������������������������������������������������������������� 141
The Power Query Editor������������������������������������������������������������������������������������������������������������ 143
The Applied Steps List��������������������������������������������������������������������������������������������������������� 144
The Power Query Editor Ribbons����������������������������������������������������������������������������������������� 145
Dataset Shaping������������������������������������������������������������������������������������������������������������������������ 152
Renaming Columns������������������������������������������������������������������������������������������������������������� 153
Reordering Columns������������������������������������������������������������������������������������������������������������ 153
Removing Columns�������������������������������������������������������������������������������������������������������������� 155
Choosing Columns��������������������������������������������������������������������������������������������������������������� 156
Merging Columns���������������������������������������������������������������������������������������������������������������� 158
Moving to a Specific Column����������������������������������������������������������������������������������������������� 161
Removing Records�������������������������������������������������������������������������������������������������������������������� 162
Keeping Rows���������������������������������������������������������������������������������������������������������������������� 163
Removing Duplicate Records���������������������������������������������������������������������������������������������� 166
Sorting Data������������������������������������������������������������������������������������������������������������������������������ 167
Reversing the Row Order����������������������������������������������������������������������������������������������������� 168
Undoing a Sort Operation���������������������������������������������������������������������������������������������������� 168
Filtering Data���������������������������������������������������������������������������������������������������������������������������� 170
Selecting Specific Text Values��������������������������������������������������������������������������������������������� 170
Finding Elements in the Filter List��������������������������������������������������������������������������������������� 171

vi
Table of Contents

Filtering Text Ranges����������������������������������������������������������������������������������������������������������� 172


Filtering Numeric Ranges���������������������������������������������������������������������������������������������������� 173
Filtering Date and Time Ranges������������������������������������������������������������������������������������������� 174
Filtering Numeric Data�������������������������������������������������������������������������������������������������������� 175
Applying Advanced Filters��������������������������������������������������������������������������������������������������� 177
Grouping Records��������������������������������������������������������������������������������������������������������������������� 179
Simple Groups��������������������������������������������������������������������������������������������������������������������� 179
Complex Groups������������������������������������������������������������������������������������������������������������������ 181
Count Rows������������������������������������������������������������������������������������������������������������������������������� 184
Saving Changes in the Query Editor������������������������������������������������������������������������������������������ 184
Exiting the Query Editor������������������������������������������������������������������������������������������������������������ 184
Conclusion�������������������������������������������������������������������������������������������������������������������������������� 185

Chapter 7: Data Transformation���������������������������������������������������������������������������� 187


Viewing a Full Record��������������������������������������������������������������������������������������������������������������� 188
Power Query Editor Context Menus������������������������������������������������������������������������������������������ 189
Using the First Row as Headers������������������������������������������������������������������������������������������������ 190
Changing Data Type������������������������������������������������������������������������������������������������������������������ 192
Detecting Data Types����������������������������������������������������������������������������������������������������������� 195
Data Type Indicators������������������������������������������������������������������������������������������������������������ 195
Switching Data Types���������������������������������������������������������������������������������������������������������� 196
Data Type Using Locale�������������������������������������������������������������������������������������������������������� 197
Replacing Values����������������������������������������������������������������������������������������������������������������������� 198
Transforming Column Contents������������������������������������������������������������������������������������������������� 201
Text Transformation������������������������������������������������������������������������������������������������������������� 201
Adding a Prefix or a Suffix��������������������������������������������������������������������������������������������������� 203
Removing Leading and Trailing Spaces������������������������������������������������������������������������������� 204
Removing Nonprinting Characters��������������������������������������������������������������������������������������� 204
Number Transformations����������������������������������������������������������������������������������������������������� 205
Filling Down Empty Cells���������������������������������������������������������������������������������������������������������� 215

vii
Table of Contents

Extracting Part of a Column’s Contents������������������������������������������������������������������������������������ 218


Advanced Extract Options���������������������������������������������������������������������������������������������������� 219
Duplicating Columns����������������������������������������������������������������������������������������������������������������� 221
Splitting Columns���������������������������������������������������������������������������������������������������������������������� 222
Splitting Column by a Delimiter������������������������������������������������������������������������������������������� 223
Advanced Options for Delimiter Split����������������������������������������������������������������������������������� 225
Splitting Columns by Number of Characters����������������������������������������������������������������������� 226
Merging Columns���������������������������������������������������������������������������������������������������������������������� 228
Creating Columns from Examples��������������������������������������������������������������������������������������������� 229
Adding Conditional Columns����������������������������������������������������������������������������������������������������� 231
Index Columns�������������������������������������������������������������������������������������������������������������������������� 234
Conclusion�������������������������������������������������������������������������������������������������������������������������������� 236

Chapter 8: Restructuring Data������������������������������������������������������������������������������ 237


The Power Query Editor View Ribbon���������������������������������������������������������������������������������������� 238
Merging Data���������������������������������������������������������������������������������������������������������������������������� 239
Extending a Query with Merged Data���������������������������������������������������������������������������������� 240
Aggregating Data During a Merge Operation���������������������������������������������������������������������� 244
Merge as a New Query�������������������������������������������������������������������������������������������������������� 248
Types of Join������������������������������������������������������������������������������������������������������������������������ 248
Joining on Multiple Columns����������������������������������������������������������������������������������������������� 250
Preparing Datasets for Joins����������������������������������������������������������������������������������������������� 252
Correct and Incorrect Joins������������������������������������������������������������������������������������������������� 253
Examining Joined Data�������������������������������������������������������������������������������������������������������� 254
Appending Data������������������������������������������������������������������������������������������������������������������������� 256
Adding the Contents of One Query to Another��������������������������������������������������������������������� 256
Appending the Contents of Multiple Queries����������������������������������������������������������������������� 259
Changing the Data Structure����������������������������������������������������������������������������������������������������� 260
Unpivoting Tables���������������������������������������������������������������������������������������������������������������� 261
Pivoting Tables��������������������������������������������������������������������������������������������������������������������� 263
Transposing Rows and Columns������������������������������������������������������������������������������������������ 265

viii
Table of Contents

Loading Data from Inside the Query Editor Directly������������������������������������������������������������������ 266


Error Display����������������������������������������������������������������������������������������������������������������������������� 267
Removing Errors������������������������������������������������������������������������������������������������������������������ 268
Viewing Errors��������������������������������������������������������������������������������������������������������������������� 268
Data Transformation Approaches���������������������������������������������������������������������������������������������� 269
Conclusion�������������������������������������������������������������������������������������������������������������������������������� 269

Chapter 9: Complex Data Loads���������������������������������������������������������������������������� 271


Adding Multiple Files from a Source Folder������������������������������������������������������������������������������ 272
Filtering Source Files in a Folder���������������������������������������������������������������������������������������������� 275
Displaying and Filtering File Attributes������������������������������������������������������������������������������������� 278
Removing Header Rows After Multiple File Loads�������������������������������������������������������������������� 280
Combining Identically Structured Files������������������������������������������������������������������������������������� 280
Loading and Parsing JSON Files����������������������������������������������������������������������������������������������� 281
The List Tools Transform Ribbon����������������������������������������������������������������������������������������������� 283
Parsing XML Data from a Column��������������������������������������������������������������������������������������������� 284
Parsing JSON Data from a Column������������������������������������������������������������������������������������������� 286
Complex JSON Files������������������������������������������������������������������������������������������������������������ 288
Complex XML Files�������������������������������������������������������������������������������������������������������������������� 294
Convert a Column to a List�������������������������������������������������������������������������������������������������������� 295
Reusing Data Sources��������������������������������������������������������������������������������������������������������������� 296
Pinning a Data Source��������������������������������������������������������������������������������������������������������� 297
Copying Data from Power Query Editor������������������������������������������������������������������������������������ 298
Conclusion�������������������������������������������������������������������������������������������������������������������������������� 299

Chapter 10: Organizing and Managing Queries���������������������������������������������������� 301


Managing the Transformation Process������������������������������������������������������������������������������������� 301
Modifying a Step����������������������������������������������������������������������������������������������������������������� 302
Renaming a Step����������������������������������������������������������������������������������������������������������������� 303
Deleting a Step or a Series of Steps������������������������������������������������������������������������������������ 304

ix
Table of Contents

Discarding Changes������������������������������������������������������������������������������������������������������������������ 305


Modifying an Existing Step�������������������������������������������������������������������������������������������������� 306
Adding a Step���������������������������������������������������������������������������������������������������������������������� 308
Altering Process Step Sequencing�������������������������������������������������������������������������������������� 309
An Approach to Sequencing������������������������������������������������������������������������������������������������ 309
Error Records����������������������������������������������������������������������������������������������������������������������� 310
Managing Queries��������������������������������������������������������������������������������������������������������������������� 310
Organizing Queries�������������������������������������������������������������������������������������������������������������� 311
Grouping Queries����������������������������������������������������������������������������������������������������������������� 312
Duplicating Queries������������������������������������������������������������������������������������������������������������� 314
Referencing Queries������������������������������������������������������������������������������������������������������������ 315
Documenting Queries���������������������������������������������������������������������������������������������������������� 316
Adding a Column as a New Query��������������������������������������������������������������������������������������� 318
Managing Queries from the Queries & Connections Pane�������������������������������������������������������� 319
Conclusion�������������������������������������������������������������������������������������������������������������������������������� 320

Chapter 11: Parameterizing Queries��������������������������������������������������������������������� 321


Parameterizing Queries������������������������������������������������������������������������������������������������������������� 321
Creating a Simple Parameter���������������������������������������������������������������������������������������������� 322
Creating a Set of Parameter Values������������������������������������������������������������������������������������� 324
Creating a Query-Based Parameter������������������������������������������������������������������������������������� 326
Modifying a Parameter�������������������������������������������������������������������������������������������������������� 328
Applying a Parameter When Filtering Records�������������������������������������������������������������������� 329
Modifying the Current Value of a Parameter������������������������������������������������������������������������ 331
Applying a Parameter to a Data Source������������������������������������������������������������������������������� 332
Other Uses for Parameters�������������������������������������������������������������������������������������������������� 334
Using Parameters in the Data Source Step������������������������������������������������������������������������� 334
Applying a Parameter to a SQL Query��������������������������������������������������������������������������������� 335
Query Icons�������������������������������������������������������������������������������������������������������������������������� 337
Conclusion�������������������������������������������������������������������������������������������������������������������������������� 337

x
Table of Contents

Chapter 12: The M Language�������������������������������������������������������������������������������� 339


What Is the M Language?��������������������������������������������������������������������������������������������������������� 340
M and the Power Query Editor�������������������������������������������������������������������������������������������������� 341
Modifying the Code for a Step��������������������������������������������������������������������������������������������� 342
M Expressions��������������������������������������������������������������������������������������������������������������������� 344
Writing M by Adding Custom Columns�������������������������������������������������������������������������������������� 345
The Advanced Editor����������������������������������������������������������������������������������������������������������������� 348
Expressions in the Advanced Editor������������������������������������������������������������������������������������ 348
The Let Statement��������������������������������������������������������������������������������������������������������������� 350
Modifying M in the Advanced Editor������������������������������������������������������������������������������������ 350
Syntax Checking������������������������������������������������������������������������������������������������������������������ 352
Basic M Functions��������������������������������������������������������������������������������������������������������������������� 352
Text Functions��������������������������������������������������������������������������������������������������������������������������� 354
Number Functions��������������������������������������������������������������������������������������������������������������������� 355
Date Functions�������������������������������������������������������������������������������������������������������������������������� 357
Time Functions�������������������������������������������������������������������������������������������������������������������������� 359
Duration Functions�������������������������������������������������������������������������������������������������������������������� 359
M Concepts������������������������������������������������������������������������������������������������������������������������������� 360
M Data Types����������������������������������������������������������������������������������������������������������������������������� 361
M Values������������������������������������������������������������������������������������������������������������������������������������ 362
Defining Your Own Variables in M���������������������������������������������������������������������������������������� 363
Writing M Queries��������������������������������������������������������������������������������������������������������������������� 364
Lists������������������������������������������������������������������������������������������������������������������������������������� 365
Creating Lists Manually������������������������������������������������������������������������������������������������������� 365
Generating Sequences Using Lists�������������������������������������������������������������������������������������� 367
Accessing Values from a List����������������������������������������������������������������������������������������������� 367
List Functions���������������������������������������������������������������������������������������������������������������������� 368
Records������������������������������������������������������������������������������������������������������������������������������� 368
Tables���������������������������������������������������������������������������������������������������������������������������������� 370
Other Function Areas���������������������������������������������������������������������������������������������������������������� 372

xi
Table of Contents

Custom Functions in M������������������������������������������������������������������������������������������������������������� 372


Adding Comments to M Code���������������������������������������������������������������������������������������������������� 374
Single-Line Comments�������������������������������������������������������������������������������������������������������� 374
Multiline Comments������������������������������������������������������������������������������������������������������������ 374
Conclusion�������������������������������������������������������������������������������������������������������������������������������� 375

Appendix A: Sample Data������������������������������������������������������������������������������������� 377


Downloading the Sample Data�������������������������������������������������������������������������������������������������� 377

Index��������������������������������������������������������������������������������������������������������������������� 379

xii
About the Author
Adam Aspin is an independent business intelligence consultant based in the United
Kingdom. He has worked with SQL Server for over 25 years. During this time, he has
developed several dozen reporting and analytical systems based on the Microsoft
Analytics Stack.
Business intelligence has been Adam’s principal focus for the last 20 years. He has
applied his skills for a variety of clients in a range of industry sectors. He is the author
of Apress books: SQL Server 2012 Data Integration Recipes, Pro Power BI Desktop (now
in its third edition), Business Intelligence with SQL Server Reporting Services, and High
Impact Data Visualization in Excel with Power View, 3D Maps, Get & Transform and
Power BI.
A graduate of Oxford University, Adam began his career in publishing before moving
into IT. Databases soon became a passion, and his experience in this arena ranges from
dBase to Oracle, and Access to MySQL, with occasional sorties into the world of DB2.
He is, however, most at home in the Microsoft universe when using SQL Server Analysis
Services, SQL Server Reporting Services, SQL Server Integration Services, and Power
BI—both on-premises and in Azure.
A fluent French speaker, Adam has worked in France and Switzerland for many years.

xiii
About the Technical Reviewer
Karine Aspin is a principal consultant with Calidra Ltd., a UK-based data and analytics
consultancy. A mathematics graduate of the Swiss Federal Institute of Technology,
Karine has worked at a range of IT companies including IBM Global Services.

xv
Acknowledgments
Writing a technical book can be a lonely occupation. So I am all the more grateful for
all the help and encouragement that I have received from so many fabulous friends and
colleagues.
First, my considerable thanks go to Jonathan Gennick, the commissioning editor
of this book. Throughout the publication process, Jonathan has been both a tower
of strength and an exemplary mentor. He has always been available to share his vast
experience selflessly and courteously.
Heartfelt thanks go to Jill Balzano, the Apress coordinating editor, for calmly
managing this book through the production process. She succeeded—once again—in
the well-nigh impossible task of making a potentially stress-filled trek into a pleasant
journey filled with light and humor. Her team also deserves much praise for their
efficiency under pressure.
I also owe a debt of gratitude to my wife, Karine, for her time and effort spent
reviewing this book. Being a technical reviewer is a thankless task, but I want to say a
heartfelt “thank you” to her for the range and depth of her comments and for picking up
so much that otherwise would have gone unnoticed. The book is a better one thanks to
her efforts.
My thanks also go to Ann Gemer Tuballa for her tireless and subtle work editing and
polishing the prose and to the team at SPi Global for the hours spent preparing the book
for publishing.

xvii
Introduction
Analytics has become one of the buzzwords that define an age. Managers want their staff
to deliver meaningful insight in seconds; users just want to do their jobs quickly and
well. Everyone wants to produce clear, telling, and accurate analysis with tools that are
intuitive and easy to use.
Microsoft recognized these trends and needs a few short years ago when they
extended Excel with an add-in called Power Query. Once a mere optional extension to
the world’s leading spreadsheet, Power Query is now a fundamental pillar of the Excel
toolkit. It allows a user to take data from a wide range of sources and transform them into
the base data that they can build on to add metrics, instant analyses, and KPIs to project
their insights.
With Power Query, the era of self-service data access and transformation has finally
arrived.

What Is Power Query?


Power Query is a tool that is used to carry out ETL. This acronym stands for Extract,
Transform, Load. This is the sequential process that covers

• Connecting to source data outside the current Excel workbook (or


file if you prefer) and accessing all or part of the data that you need to
bring into Excel. This is the extract phase of ETL.

• Reshaping the data (the “data mashup” process) so that the resulting
data is in a form that can be used by Excel. Essentially, this means
ensuring that the data is in a coherent, structured, and complete
tabular format. This is the transform phase of ETL.

• Returning the data into Excel as a table in a worksheet or into the


Excel/Power Pivot data model. This is the load phase of ETL.

These three phases make up the data ingestion process. So it is worth taking a short
look at what makes up each one of them.

xix
Introduction

Connecting to Source Data


Gone are the days when you manually entered all the data you needed into a
spreadsheet. Today’s data are available in a multitude of locations and formats—and are
too voluminous to rekey.
This is where Power Query’s ability to connect instantly to 40-odd standard data
sources is simply invaluable. Is your accounting data in MS Dynamics? Just connect. Is
your CRM data in Salesforce? Just connect. Is your organization using a Data Lake?...you
can guess the reply.
Yet this is only a small part of what Power Query can do to help simplify your
analyses. For not only can it connect to a multitude of data sources (many of which
are outlined in Chapters 1 through 5), it does this via a unified interface that makes
connecting to data sources brilliantly simple. On top of this, you can use Power Query to
preview the source data and ensure that you are loading exactly what you need. Finally,
to top it all, the same interface is used for just about all of the available source data
connections. This means that once you have learned to set up one connection, you have
learned how to connect to virtually all of the available data sources.
In essence, part of Power Query is just another connection to external data. However,
its unified data access interface, range of available data sources, and sheer simplicity will
probably induce you to replace any data connections made using older technologies
pretty quickly.

D
 ata Transformation
Once you have established a connection to a data source, you may need to tweak the
data in some way. Indeed, you may even need to reshape it entirely. This is the data
mashup process—and it is the area where Power Query shines.
Power Query can carry out the simplest data transformation tasks to the most
complex data restructuring challenges in a few clicks. You can

• Filter source data so that you only load exactly the rows and columns
you need

• Extend the source data with calculations or data extracted from


existing columns of data

xx
Introduction

• Cleanse and rationalize the data easily and quickly in


a multitude of ways

• Join or split source tables to prepare a logical set of data tables for
each specific analytical requirement

• Group and aggregate source data to reduce the quantity of data


loaded into Excel

• Prepare source data tables to become a usable data model

This list merely scratches the surface of all that Power Query can do to mash up your
data. It is, without hyperbole, unbelievably powerful at transforming source data. Indeed,
it can carry out data ingestion and transformation tasks that used to be the preserve of
expensive products that required complex programming skills and powerful servers.
All of this can now be done using a code-free interface that assists you in taking the
messiest source data and delivering it to Excel as limpid tables of information ready to
work with. If you wish to become a Power Query super-user, then you can extend its
possibilities using the built-in M language.

Loading into a Worksheet or the Data Model


This final phase is the easiest by far. It is simply a question of telling Power Query where
to land the data. This can be one—or both—of

• A worksheet: Power Query can place the data from each source
query into a separate worksheet. Once in a worksheet, it is perfectly
“normal” Excel data. From here on you can do what you want to
the data in Excel just as you normally would using all the Excel
techniques that you have learned over the years.

• The data model: Also referred to, often, as the Power Pivot data
model (which is the term that I prefer to use), this is an in-memory
data store. It can handle many more rows of data than Excel—tens
of millions in some cases—and is normally the basis for pivot table
output in Excel. When dealing with large source datasets, it is often
the ideal destination for data that you have accessed using Power
Query, as it is compressed in memory (and consequently takes up
less space when saved to disk) and can easily exceed the 1,048,576
row limit of Excel worksheets.
xxi
Introduction

The data model and Power Pivot are extensive subjects in their own right, and this
book will not be looking at either of them in detail.

Integrating Power Query into Daily Workflows


Power Query is completely integrated into the latest versions of Excel. This means that
you can use it seamlessly as part of your daily routines when ingesting and analyzing
data. Put simply:

• Data source connections, transformation routines, and data loading


into Excel are created once and can be reused whenever suits you.

• You can trigger manual data refreshes at any time—and these can be
total refreshes of every source connection in a workbook or refreshes
of a single source if you prefer.

• Data sources can be reused across different Excel workbooks.

• Power Query processes can be copied between different Excel files.

• Power Query processes (called queries) can be managed and


extended with interactive parameters to create immensely powerful
ETL processes.

• Power Query–based data flows can be customized and extended


using the built-in M language.

So, as is the case for nearly all your Excel-based work, you are likely to build once
and use often.

The Evolution of Power Query


Power Query has evolved considerably over the years since it was first made available as a
downloadable add-in for Excel 2010. It was still optional for Excel 2013 and only attained
the status of being completely integrated into Excel by the 2016 version. Indeed, it suffered
a name change at that point and was accessed under the heading “Get & Transform.”
Since around 2017—and since the Excel 2019 version—it has reverted to being
Power Query once again. This is the version that is the subject of this book. This does not
mean that you cannot use the techniques described in these pages with earlier versions

xxii
Introduction

of the product. However, it will mean that certain aspects of the Excel interface that you
use to launch Power Query will be slightly different from those described in Chapters 1
through 5. These differences are essentially minor and should not present any
difficulties to experienced Excel users.
This is made possible due to the fact that Power Query is accessed using a separate
interface. It is called from inside Excel, but exists in its own parallel universe. This
ensures a consistent look and feel whatever the version of Excel that you are using. The
entry point into Power Query may change with Excel versions—but the product itself
remains the same. Just remember that the range of available data sources will depend on
the version of Excel that you are using. Some of the “enterprise-level” data sources are
only available in Pro and Enterprise subscriptions to Excel.

How to Use This Book


If you wish, you can read this book from start to finish as it is designed to be a progressive
tutorial that will help you to learn Power Query. However, as Power Query is composed
of four main areas, this book is broken down into four sets of chapters that focus on the
various key areas of the product. It follows that you can, if you prefer, focus on individual
topics in Power Query without having to take a linear approach to reading this book.

• Chapters 1 through 5 show you how to connect to a range of varied


data sources and bring this data into Excel using Power Query.
Depending on the source data that you need to use, you may only
need to dip into parts of these chapters to find guidance on how to
use a specific source data type.

• Chapters 6 through 9 explain how to transform and clean data so that


you can use it for analysis. These data transformations range from
the extremely simple to the potentially complex. Indeed, they are as
potentially vast as data itself. You may never need to apply all of the
extensive range of data modification and cleansing techniques that
Power Query can deliver—but just about everything that it can do is
explained in detail in these chapters.

xxiii
Introduction

• Chapters 10 and 11 explain how to tame the real world of data


loading and transformation. Here you will learn how to organize and
manage your queries, as well as how to add parameters to make them
more interactive and resilient.

• Chapter 12 introduces you to M—the language that Power Query uses


to transform your data. Using M you can push your data ingestion
and transformation routines to new heights that are simply not
possible using just the Power Query interface.

On to Learning Power Query


This book comes with a small set of sample data that are used to create the examples
that are used throughout the book. I realize that it may seem paradoxical to use a tiny
dataset for a product that can handle tens of millions of rows of data, but I prefer to use
a comprehensible set of source data so that the reader can concentrate on what is being
learned, rather than the data itself.
It is inevitable that not every question can be anticipated and answered in one book.
Nonetheless, I hope that I have answered many of the data ingestion and transformation
questions that you might encounter and—more importantly—have given you the
approaches and the confidence to resolve most of the Power Query challenges that you
might meet when applying this product to solve real-world problems.
As a final point, the information on “pure” Power Query in Chapters 6–12 is
independent of Excel. So if you are learning Power Query in Power BI, SQL Server
Integration Services, or the Power BI Service, you can find a wealth of relevant
information to assist you in your data transformation projects.
I wish you good luck in using Power Query, and I sincerely hope that you have as
much fun using it as I did in writing this book.

xxiv
CHAPTER 1

Using Power Query


to Discover and Load
Data into Excel
If you are reading this book, it is most likely because you need to use data. More
specifically, it may be that you need to take a journey from data to insight in which
you have to take quantities of facts and figures, shape them into comprehensible
information, and add the analysis that delivers clear meaning. More to the point, you
want to do all this using the spreadsheet that you know and trust—Microsoft Excel.
This book is all about that journey. It covers the many ways that you, an Excel user,
can transform external raw data into the information structures that enable you to
deliver high-impact analyses. This fresh approach presumes that you are not dependent
on central IT to help you to load data from external sources, nor do you need their
help on a regular basis. It is based on enabling the user to handle industrial-strength
quantities of source data using the world’s most popular spreadsheet in the shortest
possible time frame.
The keywords in this universe are

• Fast

• Decentralized

• Intuitive

• Interactive
• Delivery

1
© Adam Aspin 2020
A. Aspin, Data Mashup with Microsoft Excel Using Power Query and M,
https://doi.org/10.1007/978-1-4842-6018-0_1
Chapter 1 Using Power Query to Discover and Load Data into Excel

Using the techniques described in this book, you can discover and load data from
a multitude of external sources. You can then, quickly and intuitively, transform and
cleanse this raw data to make it structured and usable. Once ready for use, you can load
it into either Excel worksheets or the Power Pivot data model in Excel and start using the
tool you already know so well—Excel—to provide detailed analytics.
It follows that this book is written from the perspective of the user. Essentially it is
all about empowerment—letting users define their own requirements and satisfy their
own needs simply and efficiently by building on their existing skills. The amazing thing
is that you can do all of this using Excel without needing any other tools or utilities. Your
sources could be in many places and in many formats. Nonetheless, you need to access
them, sample them, select them, and, if necessary, transform or cleanse them in order to
deliver your analyses. All of this is enabled by Power Query.

Power Query
Power Query is one of the most recent additions to the Excel toolkit. Now fully integrated
into Excel, it allows you to discover, access, and consolidate information from varied
sources. Once your data is selected, cleansed, and transformed into a coherent table, you
can then place it in an Excel worksheet for detailed analysis or load it directly into Power
Pivot (the Excel data model), which is a natural repository for data when you want to
“slice and dice” it interactively.
Power Query allows you to do many things with source data, but the four main steps
are likely to be

• Import data from a wide variety of sources. This covers corporate


databases to files and social media to big data.

• Merge data from multiple sources into a coherent structure.

• Shape data into the columns and records that suit your use cases.

• Cleanse your data to make it reliable and easy to use.

There was a time when these processes required dedicated teams of IT specialists.
Well, not any more. With Power Query, you can mash up your own data so that it is the
way you want it and is ready to use as part of your self-service solution.

2
Chapter 1 Using Power Query to Discover and Load Data into Excel

This is because discovering, loading, cleansing, restructuring, and modifying source


data are what Power Query is designed to do. It allows you to accomplish the following:

• Data discovery: Find and connect to a myriad of data sources


containing potentially useful data. This can be from both public and
private data sources. This is the subject of Chapters 1 through 5.

• Data loading: Select the data you have examined and load a subset
into Power Query for shaping.
• Data modification: Modify the structure of each dataset that you have
imported.

• Filter and clean the data itself.

Although I have outlined these three steps as if they are completely separate and
sequential, the reality is that they often blend into a single process. Indeed, there could
be many occasions when you will examine the data after it has been loaded into Excel—
or clean datasets before you load them. The core objective will, however, always remain
the same: find some data and then sample it in Power Query where you can tweak, clean,
and shape it before loading it into Excel.
This process could be described simplistically as “First, catch your data.” In the world
of data warehousing, the specialists call it ETL, which is short for Extract, Transform, and
Load. Despite the reassuring confidence that the acronym brings, this process is rarely
a smooth, logical progression through a clear-cut series of steps. The reality is often
far messier. You may often find yourself importing some data, cleaning it, importing
some more data from another source, combining the second dataset with the first one,
removing some rows and columns, and then repeating these operations, as well as many
others, several times over.
In this and the following few chapters, I will try to show you how the process can
work in practice using Power Query. I hope that this will make the various steps that
comprise an ETL process clearer. All I am asking is that you remain aware that the
range of options that Power Query includes make it a multifaceted and tremendously
capable tool. The science is to know which options to use. The art is to know when to
use them.

3
Chapter 1 Using Power Query to Discover and Load Data into Excel

The Data Load Process


Let’s begin with a rapid overview of what you need to do to get some data into Excel
(assuming that you have downloaded the sample data that accompanies this book from
the Apress website—this is explained in Appendix A). The following steps explain what
you have to do to load data from a source that you know well already—Excel itself. Yes,
I know that you can copy and paste data between workbooks, but that would be to miss
the point and miss out on all the incredible extra facets of data mashup that Power Query
can offer. In this initial case, the actual source of the data is irrelevant. It could come from
any of a few dozen available sources. Excel is simply an example of potential source data.

1. Open a new, blank workbook in Excel.

2. Click Data in the menu to switch to the Data ribbon.

3. Click Get Data. The Get Data popup menu will appear, as shown
in Figure 1-1.

Figure 1-1. The Get Data popup menu

4
Chapter 1 Using Power Query to Discover and Load Data into Excel

4. Click From File.

5. Click From Workbook. The Import Data dialog will appear.

6. Click the file C:\DataMashupWithExcelSamples\


BrilliantBritishCars.xlsx. The Import Data dialog will look like the
one in Figure 1-2.

Figure 1-2. The Import Data dialog when loading data from an Excel workbook

7. Click the Import button. The Navigator dialog will appear.

8. You will see that the BrilliantBritishCars.xlsx file appears on


the left of the Navigator dialog and that any workbooks, named
ranges, or data tables that it contains are also listed under the file.

9. Click the BaseData worksheet name that is on the left. The


contents of this workbook will appear in the data pane on the
right of the Navigator dialog. The Navigator dialog should look like
Figure 1-3.

5
Chapter 1 Using Power Query to Discover and Load Data into Excel

Figure 1-3. The Navigator dialog with data selected

10. Click Load. The data will be loaded from the external Excel
workbook into a new worksheet inside the current workbook.

You will see the Excel window, like the one shown in Figure 1-4. The external data is
now an Excel table (named BaseData, as this was the name of the source data table). You
can see that the connection to the external workbook now appears on the right of the
Excel spreadsheet data in the new Queries & Connections pane. I will explain this new
element in a couple of pages once I have explained exactly why Power Query is such a
cool solution to data ingestion challenges.

6
Chapter 1 Using Power Query to Discover and Load Data into Excel

Figure 1-4. Data available in Excel

I imagine that loading this data took a few seconds at most. Yet you now have a
complete set of external data in Excel that is ready to be used for analysis and reporting.
However, for the moment, I would like to pause and explain exactly what you have seen
so far.

Why Use Power Query?


What you have just done is to open up Excel to become the preferred analysis and MI/BI
(Management Information and Business Intelligence) tool when it comes to connecting
to the information held in dozens of external data sources. What you just saw was that
Excel can now connect to multiple sources of data and bring them into spreadsheets for
further analysis in a few clicks.
However, it is vital to understand that you have so far only scratched the surface of
Power Query and all that it can do to facilitate data ingestion. This is because viewing
and loading data are just the start. As well, you can use it to

• Import data from multiple different data sources

• Import multiple datasets from external data sources at the same time

7
Another Random Scribd Document
with Unrelated Content
rolling relish of the lips, as he prepared, giving a satisfied shift to his
gown, to open his inquisitions:—
Q. You are on very intimate terms, I believe, Mr. Bickerdike, with
Sir Calvin and his family?
A. With Sir Calvin’s permission, I think I may say yes.
Q. You have seen the prisoner before?
A. Many times.
Q. Could you, as a guest, speak to his general character?
A. It has always appeared to me quite unexceptionable.
Q. Not a violent man?
A. O! dear, no.
Q. At dinner, on the night before the murder, did you notice
anything peculiar about him?
A. He appeared to me to be upset about something.
Q. And you wondered, perhaps—having only arrived that
afternoon, as I understand—what domestic tribulation could have
discomposed so stately a character? (Laughter.)
A. I may have. I had always considered Cleghorn as immovable
an institution as the Monument.
The laughter which greeted this sally appeared to reassure
witness somewhat, as did the unexpected lines on which his rather
irregular examination seemed to be developing. But his confidence
was of short duration. The very next question brought him aware of
the true purpose of this preliminary catechism, which was merely to
constitute a pretext for getting him into the witness-box at all.
Q. Was your arrival that afternoon, may I ask, in response to a
long invitation or a sudden call?
A. (With a sudden stiffening of his shoulders, as if rallying his
energies to meet an ordeal foreseen.) A sudden call. I came down in
response to a letter from my friend Mr. Hugo Kennett, inviting me to
a few days’ shooting.
Q. Mr. Hugo Kennett is a particular friend of yours, is he not?
A. We have known one another a long time.
Q. Intimate to that degree, I mean, that you have few secrets from
one another?
A. That may be.
Q. And can depend upon one another in any emergency?
A. I hope so.
Q. There was a question of emergency, perhaps, in this case?
A. I am bound to say there often is with Mr. Kennett.
Q. Will you explain what you mean by that?
A. I mean—I hope he will forgive my saying it—that his
imagination is a little wont to create emergencies which nothing but
his friends’ immediate advice and assistance can overcome. He is
apt to be in the depths one moment and on the heights the next. He
is built that way, that’s all.
Q. Was this a case of an emergency due to his imagination?
A. I won’t go quite so far as to say that.
Q. Then there was really a reason this time for his having you
down at short notice?
A. I may have thought so.
Q. We will come to that. Had he mentioned the reason in his letter
to you?
A. No. The letter only said that he badly wanted “bucking,” and
asked me to come down at once.
Q. He gave no explanation?
A. None whatever.
Q. In the letter, or afterwards when you met?
A. No.
Q. You found him in an uncommunicative mood?
A. Somewhat.
Q. Kindly say what you mean by “somewhat.”
A. I mean that, while he told me nothing definite about his reason
for having me down, he did seem to hint that there was trouble
somewhere.
Q. What were his exact words?
A. I can’t remember.
Q. Were they to the effect that he was in a devil of a fix with a girl,
and could only see one way out of it? (Sensation.)
A. (Aghast.) Nothing of the sort. Now I recall, he described himself
as sitting on a barrel of gunpowder, smoking a cigarette and waiting
for the explosion that was to come.
Q. Thank you. Another effort or two, Mr. Bickerdike, and your
memory may need no refreshing. Did you find your friend’s manner,
now, as strange as his talk?
A. It might often have seemed strange on such occasions to those
who did not know him.
Q. Answer my question, please.
A. (Reluctantly.) Well, it was strange.
Q. Stranger than you had ever known it to be before?
A. Perhaps so.
Q. I suggest that it was wild and reckless to a degree—the manner
of a man who had got himself into a hopeless scrape, and saw no
way out of it but social and material ruin?
A. It was very strange: I can say no more.
Q. Would you have considered his state compatible with that of a
young man of good position and prospects, who had entangled
himself with a girl greatly his social inferior, and was threatened by
her with exposure unless he, in the common phrase, made an
honest woman of her?
Mr. Redstall rising to object, the Bench ruled that the question was
inadmissible. It had created, however, a profound impression in
Court, which from that moment never abated. Counsel, accepting
their worships’ decision, resumed:—
Q. Had you any reason to suspect a woman in the case?
A. It was pure conjecture on my part.
Q. Then you did entertain such a suspicion?
A. Not at that time. Later perhaps.
Q. After the murder?
A. Yes, after the murder.
Q. When?
A. The moment I heard it had been committed. I was told by a
groom.
Q. About the woman or the murder?
A. About the murder.
Q. When was that?
A. When I returned from shooting that day.
Q. You returned alone, I believe?
A. Yes.
Q. Mr. Kennett having left you shortly before three o’clock?
A. I fancy about that time.
Q. And at the moment you heard there had been this murder
committed, that conjecture, that association between your friend and
the murdered girl came into your mind?
A. It was wholly preposterous, of course. I dismissed the idea the
moment it occurred to me.
Q. You dismissed the idea of Mr. Kennett’s having been involved
with the girl?
A. No, of his having committed the murder. (Sensation.)
Q. But you still thought the entanglement possible?
A. I thought it might account for his state.
Q. Why did the first idea, associating Mr. Kennett with the crime,
occur to you? (Witness hesitating, the question was repeated.)
A. (In a low voice.) O! just because of something—nothing
important—that had happened at the shoot—that, and the
extraordinary state I had found him in.
Q. Will you tell the Bench what was this unimportant something
that happened at the shoot?
A. (With emotion.) It was nothing—probably my fancy—and he
denied it utterly.
Q. Now, Mr. Bickerdike, if you please?
A. I thought that in—in pulling his gun through a particular hedge
that morning, he might have done it with less risk to himself, that was
all.
Q. You suspected him, in short, of wanting to kill himself under the
guise of an accident?
A. I swear he never admitted it. I swear he denied it.
Q. And you accepted his denial so implicitly that you asked him to
go home, leaving his gun with the keeper. Is that not so?
A. Yes.
Q. He refused?
A. Yes, he did.
Q. Did not much the same thing occur again, later in the
afternoon?
A. Nothing of the sort at all. Shortly before three he came to me,
and said he was no good and was going home.
Q. What did he mean by “no good”? No good in life?
A. No good at shooting.
Q. And again you asked him to leave his gun with you?
A. No, I did not—not directly, at least.
Q. Please explain what you mean by “not directly”?
A. He may have understood what was in my mind. I can’t say. He
just laughed, and called out that he wasn’t going to shoot himself,
and wasn’t going to let me make an ass of him; and with that he
marched off.
Q. And that is all?
A. All.
Q. He didn’t, by chance, in saying “I’m not going to shoot myself,”
lay any particular emphasis on the last word?
A. Certainly not that I distinguished. The whole suggestion is too
impossible to any one who knows my friend.
Q. Thank you, Mr. Bickerdike. That will do.
If witness had entered the box like an oppressed man, he left it like
a beaten. His cheeks were flushed, his head bowed; it was observed
that he purposely avoided looking his friend in the face as he passed
him by on his way to the rear of the Court.
The excitement was now extreme. All attention, in the midst of a
profound stillness, was concentrated on a figure come more and
more, with each adjustment of the legal spy-glass, into a definite
focus. It was felt that the supreme moment was approaching; and,
when the expected name was called, a sigh like that of a sleeper
turning seemed to sound through the hall. The prisoner in the dock
had already long been overlooked—forgotten. He had been put up, it
seemed, as a mere medium for this deadlier manifestation, and his
purpose served, had ceased to be of interest. He stood pallid with
his hands on the rail before him, rolling his one mobile eye, the only
apparently mystified man in Court.
As Hugo entered the box, he was seen to be deadly pale, but he
held his head high, and stood like a soldier, morally and physically
upright, facing his court-martial. He folded his arms, and looked his
inquisitor steadily in the eyes. Mr. Fyler retorted with an expression
of well-assured suavity. He was in no hurry. Having netted his fowl,
he could afford to let him flutter awhile. He began by leading his
witness, only more briefly, the way he had already conducted him at
the Inquest, but with what new menace of pitfalls by the road! The
discovery of the body; the incident of the gun (prejudiced now in the
light of the possible moral to be drawn from witness’s hurry to get rid
of it, and his loathing of the weapon), the marked agitation of his
aspect when seen by the gardener; the interval in the house, with its
suggestion of nervous collapse and desperate rallying to face the
inevitable ordeal; that significant outburst of his at the Inquest, when
he had exclaimed against an implication of guilt which had never
been made; his admission of having bantered the deceased about
an assignation—an admission fraught with suspicion of the scene of
passion and recrimination which had perhaps more truthfully
described their encounter—all these points were retraversed, but in
a spirit ominously differing from that in which they had formerly been
reviewed. And then at last, in a series of swift stabbing questions
and hypotheses, issued the mortal moral of all this sinister exordium:

Q. You chaffed the deceased, you say, sir, with being where she
was for an assignation?
A. Something of the sort.
Q. Something of the sort may be nothing of the sort. I suggest that
this so-called chaff is better described as a quarrel between you. Will
you swear that that was not the case?
A. No, I will not.
Q. Then your statement was a fabrication?
A. I accused her of being there to meet some one.
Q. You accused her. I am your debtor for the word. Will you swear
that she was not there to keep an assignation, and that assignation
with yourself?
A. I swear it most positively. Our meeting was quite accidental.
Q. On your part?
A. On my part.
Q. But not on hers?
A. I am not here to answer for that.
Q. Pardon me; I think you are. I suggest that, expecting you to
return by the Bishop’s Walk, she was waiting there to waylay you?
A. She might have been, on the chance.
Q. I suggest you knew that she was?
A. I say I did not know.
Q. Well, you took that way at least, and you met and quarrelled. I
suggest that the person you accused her of being there to meet was
yourself, and that the dispute between you turned upon the question
of her thus importuning you? Is that so?
A. (After a pause.) Yes.
Q. And I suggest further that the reason for her so importuning you
lay in her condition, for which you were responsible?
A. Yes. It is true. (Sensation.)
Q. She entreated you, perhaps, to repair the wrong you had done
her in the only way possible to an honourable man?
A. (Witness seeming to stiffen, as if resolved to face the whole
music at last.) She had already urged that; she pressed to know, that
was all, if I had made up my mind to marry her. I refused to give a
definite answer just then, since my whole career was at stake; but I
promised her one within twenty-four hours. I was very much
bothered over the business, and I dare say a bit impatient with her.
She may have upbraided me a little in return, but there was no actual
quarrel between us. I went on after a few minutes, leaving her there
by herself. And that is the whole truth.
Q. We will judge of that. You say the meeting was none of your
seeking?
A. I do say it.
Q. Now, please attend to me. You were on your way back, when
you met deceased, from the shooting party which you had
abandoned?
A. Yes.
Q. You have heard what the last witness stated as to a certain
incident connected with that morning. Was his statement
substantially true?
A. I can’t deny it. It was a momentary mad impulse.
Q. And, being forestalled, was replaced possibly by an alternative
suggestion, pointing to another way out of your difficulties?
A. I don’t know what you mean. It was just the culmination, as it
were, of a desperate mood, and was regretted by me the next
instant.
Q. Was it because of your desperate mood that you refused to be
parted from your gun when you finally left the shoot and returned
home?
A. No; but because I declined to be made to look a fool.
Q. I put it to you once more that you knew, when you went home,
carrying against all persuasion, your gun with you, that the deceased
would be waiting for you in the copse?
A. It is utterly false. I knew nothing about it.
Q. Very well. Now, as to the time of your meeting with the
deceased. I have it stated on your sworn evidence that that was at
three o’clock or thereabouts, and that after spending some ten
minutes in conversation with her, you resumed your way to the
house, which you reached at about 3.15, appearing then, according
to the evidence of a witness, in a very agitated state.
A. I was upset, I own—naturally, under the circumstances.
Q. What circumstances?
A. Having just promised to do or not to do what would affect my
whole life.
Q. No other reason?
A. No.
Q. Did you hear the sworn statement of the witness Henstridge
and another that the report of the shot, which could have been none
other than the fatal shot, was heard and fixed by them at a time
estimated at a few minutes after three o’clock, that is to say, at a
time when, according to your own admission, you were in the
deceased’s company?
A. It is an absolute lie.
The crisis had come, the long-expected blow fallen; but, even in
the shock and echo of it, there were some who found nerve to
glance from son to father, and wonder what super-dramatic incident
yet remained to them to cap the day’s excitement. They were
disappointed. Not by one sign or movement did the stiff grey figure
on the Bench betray the torture racking it, or concede to their
expectations the evidence of an emotion—not even when, as if in
response to some outspoken direction, a couple of policemen were
seen to move silently forward, and take their stand on either side the
witness box. And then, suddenly, Counsel was speaking again.
He addressed the Bench with an apology for the course imposed
upon him, since it must have become apparent, as the case
proceeded, that the tendency of the prosecution had been to turn
more and more from its nominal objective in the dock. There had
been a reason for that, however, and he must state it. The inquiries
of the police, and more especially of the distinguished detective
officer, Sergeant Ridgway, had latterly, gradually but certainly, led
them to the conclusion that the motive for the crime, and the name of
its perpetrator, must be looked for in another direction than that
originally, and seemingly inevitably, indicated. This change of
direction had necessarily exculpated the two men concerned in to-
day’s proceedings; but it had been thought best to submit one of
them to examination for the purpose of exposing through the
evidence affecting him the guilt of the presumptive criminal. That
having been done, the police raised no objection to Cleghorn, like
the other accused, being discharged.
He then went on to summarize the evidence, as it had come, by
gradual degrees, to involve the witness Kennett in its meshes—the
scrape into which the young man had got himself, his dread of
exposure, the wildness of his talk and behaviour, the incriminating
business of the gun, and, finally, the sworn testimony as to the time
of the shot—and he ended by drawing a fanciful picture of what had
occurred in the copse.
“I ask your worships,” he said, “to picture to yourselves the
probable scene. Here has this young Lothario returned, his heart full
of death and desperation since the frustration of his first mad
impulse to end his difficulties with his life, knowing, or not knowing—
we must form our own conclusions as to that—that his destined
victim awaits him at the tryst—if tryst it is—her heart burning with
bitterness against the seducer who has betrayed her; each resolved
on its own way out of the trouble. She upbraids him with her ruin,
and threatens in her turn to ruin him, unless he consents to right the
wrong he has done her. He refuses, or temporizes; and she turns to
leave him. Thinking she is about to put her threat into immediate
execution, goaded to desperation, the gun in his hand—only
tentatively adhered to at first, perhaps—decides him. He fires at and
kills her. The deed perpetrated, he has to consider, after the first
shock of horror, how best to conceal the evidences of his guilt. He
decides to rest the lethal weapon against a tree (with the intention of
asserting—or, at least, not denying, if subsequently questioned—that
he had left it with one of its barrels loaded), concocts in his mind a
plausible story of a cigarette and an oversight, and hurries on to the
house, where, in his private room, he spends such a three-quarters
of an hour of horror and remorse as none of us need envy him. His
nerve by then somewhat restored, he decides to take the initiative in
the necessary discovery, and, affecting a sudden recollection of his
oversight, returns to the copse to fetch his gun, with the result we
know. All that it is open to us to surmise; what we may not surmise is
the depth of depravity in a nature which could so plan to cast the
burden of its own guilt upon the shoulders of an innocent man.”
One dumb, white look here did the son turn on the father; who met
it steadfastly, as white and unflinching.
“We have heard some loose talk, your worships,” went on
Counsel, “as to the appearance of a mysterious fourth figure in this
tragedy. We may dismiss, I think, that individual as purely chimerical
—a maggot, if I may so describe it, of the witness Henstridge’s brain.
There is no need, I think you will agree with me, for looking beyond
this Court for a solution of the problem which has been occupying its
attention. Painful as the task is to me, I must now do my duty—
without fear or favour in the face of any considerations, social or
sentimental, whatsoever—by asking you to commit for trial, on the
capital charge of murdering Annie Evans, the witness Hugo Staveley
Kennett, a warrant for whose arrest the police already hold in their
hands.”
Not a sound broke the stillness as Counsel ended—only a muffled
rumble, like that of a death-drum, from the wheels of a passing
wagon in the street outside. And then the blue-clad janissaries
closed in; the Magistrates, without leaving the Bench, put their heads
together, and the vote was cast.
“Hugo Staveley Kennett, we have no alternative but to commit you
to take your trial on the capital charge.”
A sudden crash and thump broke in upon the verdict. Cleghorn
had fainted in the dock.
CHAPTER XV.
THE FACE ON THE WALL

The morning of the inquiry found M. le Baron in Paris, in his old


rooms at the Montesquieu. He was in very good spirits, smiling and
buoyant, and not at all conscience-smitten over his desertion of his
servant in his hour of need. “It will be a not unwholesome lesson for
the little fanfaron,” he thought, “teaching him in the future to keep a
guard on his tongue and temper.” He foresaw, be it observed, that
certain issue, and felt no anxiety about it. But his face fell somewhat
to an added reflection: “I wonder if they have committed him for trial
by now. Poor girl!” and he shrugged his shoulders with a tiny sigh.
Having crossed by the night boat from Southampton, one might
have looked for a certain staleness in the Baron’s aspect. On the
contrary, he was as chirpy as a sparrow, having slept well throughout
a pretty bad crossing, and since had a refreshing tub and brush-up.
He sat down—though very late, with an excellent appetite—to his
petit pain and rich coffee and brioche, and, having consumed them,
took snuff at short intervals for half an hour, and then prepared to go
out.
M. le Baron’s movements seemed carelessly casual, but he had,
in fact, a definite objective, and he made for it at his leisure. It lay on
the left bank of the river, in or near the district calling itself loosely the
Latin or Students’ Quarter. He crossed the river by the Pont des Arts,
and went straight down the Rue de Seine as far as the Rue de
Tournon, where he turned off in the direction of St. Sulpice. The
great bell up in the high tower was crashing and booming for a
funeral, and its enormous reverberations swayed like Atlantic rollers
across the fields of air. In all the world St. Sulpice bell is the death-
bell, so solemn, so deep, and so overwhelming it sounds. M. le
Baron paused to listen a moment. “Is it an omen?” thought he, “and
am I going to hear bad news?”
Somewhere at the back of the church, in a little street called the
Rue Bourbon-le-Château, he came to the shop of a small dealer in
prayer-books and holy pictures and pious images. It was a poor shop
in a faded district, and suggestive of scant returns and lean
commons for its inmates. A door, as gaunt and attenuated in
appearance, stood open to one side of the shop, and by this the
visitor entered, with the manner of one who knew the place. A flight
of bare wooden stairs rose before him, and up these he went, to the
first, to the second floor, where he paused, a little breathless, to
knock on a door. “Que diable!” cried a hoarse voice from within.
“Who’s that?”
For answer the Baron turned the handle and presented himself. It
was a ragged, comfortless room he entered, frowzy, chill, without a
carpet and with dirty whitewashed walls. A table stood in the dingy
window, and at it was seated the solitary figure of a man—
emaciated, melancholy eyed—Ribault his name, a designer on the
staff of the Petit Courrier des Dames. Some of his work lay before
him now: he looked up from it with a startled exclamation, and rose
to his feet. Those were clad in list slippers: for the rest he wore a
rusty frock-coat, and at his neck a weeping black bow.
“M. le Baron!” he exclaimed, in wonder and welcome. “Who would
have thought to see you again!”
“Am I that sort, then?” answered Le Sage with a smile. “I am sorry
I left so poor an impression.”
“Ah, but what an impression!” cried the other fervently. “An angel
of goodness; a Samaritan; a comforter, and a healer in one!”
“Well, well, M. Ribault!” said the Baron. “You are still at the old toil,
I observe?”
“Always at it, Monsieur; but in my plodding, uninspired way—not
like my friend’s. Ah, he was a great artist was Jean.”
“Truly, he had a wonderful facility. Has he left you?”
“But for the grave, Monsieur. We had not otherwise been parted.”
Tears gathered in the poor creature’s eyes; he sighed, with a
forlorn, resigned gesture. Hearing his words, a shadow crossed the
visitor’s face. “That foreboding bell!” he muttered. He was genuinely
concerned, and not for one only reason. “You will tell me all about it,
perhaps, M. Ribault?” he said.
“He was never himself again after that accident,” answered the
designer. “All your tenderness, your care, your disinterested help
could do no more than earn for him a little respite from a sentence
already pronounced. He was virtually a dying man when you last left
him, Monsieur. The light of your healing presence withdrawn, the
shadow came out and was visible to me. Ah, but he would talk of you
often and often, and of how you had smoothed the bitter way for him.
He confided in you much: he told you his little history?”
“Something of it, Ribault.”
“It was the history of a brave man, Monsieur: of patient merit
eternally struggling against adversity; of conscious power having to
submit itself to necessity. There was that in him could he but have
indulged it—ah, if you had only seen!”
“Seen what, my poor friend?”
“Monsieur, he died in June; but before he died, he drew in pastel
on that wall, on that bare wall, a face that was like the fine blossom
of the aloe, crowning and vindicating with its immortal beauty the
harsh and thorny ugliness of those long necessitous years. It was his
testament, his swan-song. Less than its perfection would have made
a smaller artist; and it was produced by him from memory, as he sat
there dying in his chair.”
“From a memory of whom, Ribault?”
“I will tell you. One day, shortly before his death, there had come
to see him a step-brother of his, an Englishman, of whom I had
never heard nor he spoken. He had a lady with him, this brother, one
of the most beautiful you could picture, and her loveliness entered
into Jean’s heart. He could not forget it; he had no ease from it until
his art came to dispossess him of its haunting. I watched him at
work; it was marvellous: the wall broke into song and flower under
my eyes. That was the man, Monsieur; that was the man; it was his
own soul blossoming; and, having done what he must, he grew once
more at peace. Two days later he was dead.”
“I see no face on the wall, Ribault.”
“Alas, no, Monsieur! Alas, alas, no! When he returned, this strange
relation, this vandal, after his brother’s death, to arrange for the
funeral and dispose of his effects, he saw the drawing and he
denounced it. He did more: in his anger he seized a cloth, and,
before I could interpose, that miracle, that dream, was but a
featureless smudge upon the wall. And even then he would not be
satisfied until the last rainbow tints had vanished.”
The frown on M. le Baron’s brow was again darkening its habitual
placidity.
“What excuse had the man to offer for an act so outrageous?” he
demanded warmly.
The designer shrugged his shoulders. “What excuse but of the
jealous and coarse-grained! He said that the lady’s permission
should have been asked first; that anyhow the artist being dead it
could not matter, and that he had no idea of leaving the portrait there
to become the cynosure of common eyes. He was a hard man,
Monsieur, and we came to words.”
The visitor grunted. “M. Ribault, what was the name of this Goth?”
“It was the name of my friend, Monsieur.”
“What! Christian and surname the same?”
“Precisely one, Monsieur. They were beaux-frères, no more. With
such it may be.”
“Indubitably. And the lady’s name?”
“I could show you sooner than pronounce it. It was written by Jean
under the portrait.”
“But the portrait is lost!”
“Nevertheless, it is not altogether forgotten. Before it was
destroyed I had borrowed a camera from a friend and achieved a
reproduction of it. Alas, Monsieur! but a cold shadow of the original—
a sadness, a reflection, but, such as it is, a record I would not
willingly let perish.”
The Baron’s brow was smoother again; his eyes had recovered
their good humour.
“But this is interesting, my friend,” he said. “Might I be permitted to
see it?”
“Who sooner!” cried the designer. “Monsieur has only to
command.”
He went to a cupboard, and presently produced from it a
photograph mounted on brown paper, which he presented to his
visitor.
“You must not judge from it,” he said, “more than you would from
the shadow of an apple tree the colour of its blossom. But is it not a
beautiful face, Monsieur?”
“Beautiful, indeed,” answered Le Sage, profoundly pre-occupied.
“And did the brother know you had secured this transcript?” he
asked presently.
“Of a truth not, Monsieur. Sooner would I have died than tell him.”
“Ah!” For minutes longer the Baron stood absorbed in
contemplation of the photograph. Then suddenly he looked up.
“I want you to part with this to me, my friend.”
“Monsieur, it is yours. There is none to whom I would sooner
confide it.”
“You have the negative?”
“Truly, yes.”
“Keep it, and print no more from it for the present. Above all, keep
the knowledge of your possessing it from the Goth.”
Between wonder and sympathy the Frenchman acquiesced.
“No doubt he would want to destroy that too,” he said.
“Exactly,” answered Le Sage. “Now, listen, my friend. I have a
commission for you.”
It was a very handsome commission, the nature of which need not
be specified, since it was in effect merely a delicate acknowledgment
of a service rendered. And if the acknowledgment was out of all
proportion with the service, that was M. le Baron’s way, and one not
to be resented by a poor man who was also a reasonably proud
man. So the two parted very good friends, and the Baron went back
to his hotel, in high good humour with himself and all the world. On
the following night he was in London, ensconced in rooms in a
private hotel in Bloomsbury, where he learnt from the papers of the
latest startling development in what had come to be known as the
“Wildshott Murder Case.” “So,” he thought, “it works according to
plan.”
He had managed to procure, while in Paris, a personal
introduction from a certain eminent official to a corresponding
dignitary in the Metropolis; but for the present he kept that in his
pocket. There were some smaller fry to be dealt with first: aids of the
great approach.
CHAPTER XVI.
THE BARON FINDS A CHAMPION

(From the Bickerdike MS.)


Who that was present at that scene could ever forget its anguish
and pathos? Its fierce dramatic intensity will remain for all time
indelibly seared on my soul. Could I believe in my friend’s guilt?
Knowing him, it was impossible: and yet that seemingly
incontrovertible evidence as to when the shot was fired? If he had
done it, if he had done it, not his own nature but some fiend
temporarily in possession of it must have directed his hand. But I
would not believe he had done it. I would not, until I had heard him
confess to it with his own lips. However appearances might be
against him, he should find an unshakable ally in me. And if the
worst were to come to the worst, and the trial confirm his guilt
beyond dispute, there would be that yet for me to plead in revision of
my former evidence so cruelly surprised from me, to plead in virtue
of my intimacy with the unhappy boy—that in the moods to which he
was subject he was apt to lose complete control of himself, and to
behave on occasions veritably like a madman. It might mitigate,
extenuate—who could say? But in the meantime I would not believe
—not though the world accused him.
Before he was taken away he and his father met in a room below
the Court. Sir Calvin, coming across the floor after the committal,
looked like a white figure of Death—Death stark, but in motion. He
walked straight on, avoiding nobody; but a little stagger as he
passed near me was eloquent of his true state. I was moved
impulsively to hold out my arm to him, and he took it blindly, and we
descended the stairs together. In a bare vault-like office we found my
poor friend. He was in charge of the two policemen who had arrested
him. His deadly pallor was all gone, and succeeded by a vivid flush.
He held out his hand with a steadfast smiling look.
“Take it or not, sir,” he said.
It was taken, and hard wrung—just that one moment’s
understanding—and the two fell apart.
“Thank you, sir,” said the boy simply. “I did not do it, of course.”
The father laughed; it wrung one to hear him, and to see his face.
“One of your judges, Hughie,” he said, wheezing hilariously—“old
Crosson; you know him—told me not to lose heart—that
appearances weren’t always to be trusted. He ought to know, eh,
after three attempts?”
“I wanted you just to hear me say,” said the other hurriedly, “that
I’m glad it’s come—not the way it has, but the truth. I’ve behaved like
a blackguard, sir, and it’s been weighing on me; you don’t know how
it’s been weighing. It’s been making my life hell for some little time
past. But now you know, and it’s the worst of me—bad enough, but
not the unutterable brute they’d make me out.” He turned to me. “So
they got at you, Viv.,” he said. “Never mind, old boy; you meant the
best.”
“It was an infamous breach of confidence,” I burst out. “It was that
Sergeant led me on.”
“Yes,” said Hugh: “I supposed he was at the bottom of all this. But I
can’t help his witnesses. It was the truth I told.”
“He has betrayed the house,” I said hotly. “He was engaged to
serve.”
But to this Sir Calvin, greatly to my surprise and indignation,
demurred, in a hoarse broken way: “If he thought his duty lay this
road, it was his business like an honest man to take it. We want no
absolution on sufferance—eh, Hughie, my boy?”
“No, sir, no. You will see that I am properly advised as to the best
way to go to clear myself. Thank God my mother isn’t alive!”
It was said with the first shadow of a break in his voice, and the
General could not stand it. He gave a little gasp, and turned away,
his fingers working at his moustache.
“She’ll see to it, Hughie,” he said indistinctly, “that—that it’s all
made right. There was never a more truth-loving woman in the world.
But you shall have your advice—for form’s sake—the best that can
be procured.”
“Thank you, sir.”
It was intimated that the interview must end. The two men just
faced one another—an unforgetable look; and then the father turned,
and, rigid as a sleep-walker, passed out of the room without another
word. I lingered behind a moment, just to whisper my friend bonne
chance; then hurried after the retreating figure. We entered the car in
silence, and drove off alone together, leaving the household
witnesses to follow later. All the way it must have lain in the mind of
the stiff figure beside me with what other expectations, in what other
company, we had made the outward journey. I thought it best not to
disturb him; and we reached the house without a solitary sentence, I
believe, having passed between us. Once there, Sir Calvin walked
straight into his study, and I saw him no more that day.
What was the true thought in his heart? faith scornful and
triumphant, or some secret misgiving? Who could tell? Perhaps for
the first time some doubts as to his own qualifications as a father
were beginning to move in him, some tragic, self-searching for the
seed of what might or might not be in this “fruit of his blood.” The day
stole by on hushed wings; a sense of still fatality brooded over the
house. The voiceless, almost unpeopled quiet told upon my nerves,
and kept me wandering, aimless and solitary, from room to room.
Near evening, Audrey was sent for by her father. I saw her, and saw
her for the first time since our return, as she disappeared into his
study. What passed between them there one could only surmise, but
at least it was marked by no audible sounds of emotion. In that dead
oppression I would have welcomed even her company; but she
never came near me, and I was left to batten as I would on my own
poisonous reflections. They passed and passed in review, with
sickening iteration, the same wearisome problems—the evidence,
my hateful and unwilling share in it, my friend’s dreadful situation.
Against the detective I felt a bitter animosity. No wonder that,
conscious of his treachery to his employer, as I still persisted in
regarding it, his manner had changed of late, and he had held
himself aloof from us. Even that cynical official fibre, I supposed,
could not be entirely insensitive to the indecency of eating the salt of
him he was planning to betray. I was so wroth with him that I could
have wished, if for no other reason than his discomfiture, to vindicate
my friend’s innocence. The thought sent me harking back once more
over familiar ground. If Hugh were innocent, who was guilty? If
another could be proved guilty, or even reasonably suspect, the
whole evidence against the prisoner fell into discredit. Who, then?
Now, not this overwhelming business itself had been enough to
dismiss wholly from my mind its haunting suspicions regarding the
Baron. So secret, so subtle, so inexplicable, could it still be possible
that he was somehow implicated in the affair? If not, was it not at
least remarkable that it should have coincided with his coming,
involved his servant, been followed by that midnight theft of the
paper? And then suddenly there came to me, with a little shock of
the blood, a memory of our conversation in the keeper’s cottage on
the fatal day of the shoot. How curious he had been then on the
subject of poachers, of their methods, of their proneness to violence
on occasion! He had asked so innocently yet shown such
shrewdness in his questions, that even Orsden had laughingly
commented on the discrepancy. And that mention of the muffling
properties of a mist in the matter of a gunshot! Why, it was as if he
had wished to assure himself of the adequacy of some precaution
already calculated and taken to mislead and bewilder in a certain
issue!
The thought came upon me like a thunderclap. Was it, could it be
possible that some blackguard poacher had been made the
instrument of a diabolical plot—perhaps that fourth shadowy figure
that had never materialised; perhaps Henstridge himself, who had
volunteered the damning evidence, and whom it would be one’s
instinct to mistrust? Le Sage and Henstridge in collusion! Was it an
inspiration? Did I stand on the threshold of a tremendous discovery?
In spite of the feverish excitement which suddenly possessed me, I
could still reason against my own theory. The motive? What possible
motive in murdering an unoffending servant girl? Again, what time
had been the Baron’s in which to complot so elaborate a crime?
But, supposing it had all been arranged beforehand, before ever
he came? I had not overlooked the mystery attaching to the girl
herself. It might cover, for all one knew, a very labyrinthine intrigue of
vengeance and spoliation.
And then in a moment my thought swerved, and the memory of
Cleghorn returned to me—Cleghorn, white and abject, grasping the
rail of the dock. Cleghorn fainting where he stood. What terrific
emotion had thus prostrated the man, relieved from an intolerable
oppression? Was mere revulsion of feeling enough to account for it,
or was it conceivable that he too was, after all, concerned in the
business, a third party, and overwhelmed under his sense of
unexpected escape from what he had regarded as his certain doom?
I was getting into deep waters. I stood aghast before my own
imagination. How was I to deal with its creations?
It was an acute problem, my decision on which was reached only
after long deliberation. It was this: I would keep all my suspicions
and theories to myself until I could confide them to the ear of the
Counsel on Hugo’s behalf.
In the meantime some relief from the moral stagnation of Wildshott
had become apparent with the opening of the day succeeding the
inquiry. That deadly lethargy which had followed the first stunning
blow was in part shaken off, and the household, though in hushed
vein, began to resume its ordinary duties. Sir Calvin himself
reappeared, white and drawn, but showing no disposition to suffer
commiseration in any form, or any relaxation from his iron discipline.
The events of the next few days I will pass over at short length. They
yielded some pathos, embraced some preparations, included a visit.
I may mention here a decision of the General’s which a little, in one
direction, embarrassed my designs. Just or unjust to the man, he
would not have Cleghorn back. One could not wonder, perhaps, over
his determination; yet I could have preferred for the moment not to
lose sight of my suspect. We heard later that the butler, as if
anticipating his dismissal, had gone, directly after his release, up to
London, where, no doubt, he could be found if wanted. I had to
console myself with that reflection. The valet, Louis, we came to
learn about the same time, had taken refuge, pending his master’s
return—he had got to hear somehow of the Baron’s absence—with
an excellent Roman Catholic lady, who had pitied his case and
offered him employment. He had no desire, very certainly, to return
to a house where he had suffered so much.
Of a visit I was allowed to pay my friend in the prison I do not wish
to say a great deal. The interview took place in a room with a grating
between us and a warder present. The circumstances were
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

textbookfull.com

You might also like