Errata corrige
To ensure the ongoing accuracy of this book and its companion content, we have reviewed and confirmed the errors listed below. If you find a new oversight not included in both of the following sections, please report it to us.
Important issues
Corrections in this section are important to fully understand the concepts explained in the book.No important issues have been reported yet.
Minor issues
Corrections in this section do not affect the ability to learn the concepts explained in the book.-
Page 28: Wrong date
The third line of the first paragraph in section “Quarter-over-quarter-to-date growth” should reference May 15, 2009 instead of May 15, 2008.
-
Page 43: Variable name is Period30D without spaces
The variable Period30D is referenced two times as “Period 30D” in the measure Sales AVG 30D definition in the printed book.
The sample file is correct.
The right definition is the following:12345678910111213141516171819202122232425262728Sales AVG
30
D
:=
VAR
Period30D
=
CALCULATETABLE
(
DATESINPERIOD
(
'Date'[Date]
,
MAX
(
'Date'[Date]
)
,
-
30
,
DAY
)
,
'Date'[DateWithSales]
=
TRUE
)
VAR
FirstDayWithData
=
CALCULATE
(
MIN
(
Sales[Order Date]
)
,
REMOVEFILTERS
(
)
)
VAR
FirstDayInPeriod
=
MINX
(
Period30D
,
'Date'[Date]
)
VAR
Result
=
IF
(
FirstDayWithData <
=
FirstDayInPeriod
,
AVERAGEX
(
Period30D
,
[Sales Amount]
)
)
RETURN
Result
-
Page 149: Wrong date
The third line of the first paragraph should reference May 15, 2009 instead of May 15, 2008.
-
Page 150: Missing filter in LastDayOfMonthWithSales variable
The code in the book is different than the code in the sample files, which is correct.
The only difference is the highlighted line 30 in the following correct code (missing filter over ‘Date'[Year Month Number] in LastDayOfMonthWithSales variable of the measure Sales PQTD):12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364Sales PQTD
:=
IF
(
[ShowValueForDates]
,
VAR
LastMonthSelected
=
MAX
(
'Date'[Year Month Number]
)
VAR
DaysOnLastMonth
=
CALCULATE
(
COUNTROWS
(
'Date'
)
,
ALLEXCEPT
(
'Date'
,
'Date'[Working Day]
,
'Date'[Day of week]
)
,
'Date'[Year Month Number]
=
LastMonthSelected
)
VAR
DaysLastMonthSelected
=
CALCULATE
(
COUNTROWS
(
'Date'
)
,
'Date'[DateWithSales]
=
TRUE
,
'Date'[Year Month Number]
=
LastMonthSelected
)
VAR
LastDayOfMonthWithSales
=
MAX
(
-- End of month of any month
31
*
(
DaysOnLastMonth
=
DaysLastMonthSelected
)
,
-- or last day selected with data
CALCULATE
(
MAX
(
'Date'[Day of Month Number]
)
,
REMOVEFILTERS
(
-- Removes filters from all of the
'Date'[Working Day]
,
-- filter-safe columns
'Date'[Day of Week]
,
-- to get the last day with data
'Date'[Day of Week Number]
-- selected in the report
)
,
'Date'[Year Month Number]
=
LastMonthSelected
,
'Date'[DateWithSales]
=
TRUE
)
)
VAR
LastMonthInQuarterWithSales
=
CALCULATE
(
MAX
(
'Date'[Fiscal Month In Quarter Number]
)
,
REMOVEFILTERS
(
-- Removes filters from all of the
'Date'[Working Day]
,
-- filter-safe columns
'Date'[Day of Week]
,
-- to get the last day with data
'Date'[Day of Week Number]
-- selected in the report
)
,
'Date'[DateWithSales]
=
TRUE
)
VAR
PreviousFiscalYearQuarter
=
MAX
(
'Date'[Fiscal Year Quarter Number]
)
-
1
VAR
FilterQTD
=
FILTER
(
ALL
(
'Date'[Fiscal Month In Quarter Number]
,
'Date'[Day of Month Number]
)
,
ISONORAFTER
(
'Date'[Fiscal Month In Quarter Number]
,
LastMonthInQuarterWithSales
,
DESC
,
'Date'[Day of Month Number]
,
LastDayOfMonthWithSales
,
DESC
)
)
VAR
Result
=
CALCULATE
(
[Sales Amount]
,
ALLEXCEPT
(
'Date'
,
'Date'[Working Day]
,
'Date'[Day of Week]
)
,
'Date'[Fiscal Year Quarter Number]
=
PreviousFiscalYearQuarter
,
FilterQTD
)
RETURN
Result
)
-
Page 153: Missing filter in LastDayOfMonthWithSales variable
The code in the book is different than the code in the sample files, which is correct.
The only difference is the highlighted line 30 in the following correct code (missing filter over ‘Date'[Year Month Number] in LastDayOfMonthWithSales variable of the measure Sales PMTD):123456789101112131415161718192021222324252627282930313233343536373839404142434445Sales PMTD
:=
IF
(
[ShowValueForDates]
,
VAR
LastMonthSelected
=
MAX
(
'Date'[Year Month Number]
)
VAR
DaysOnLastMonth
=
CALCULATE
(
COUNTROWS
(
'Date'
)
,
ALLEXCEPT
(
'Date'
,
'Date'[Working Day]
,
'Date'[Day of week]
)
,
'Date'[Year Month Number]
=
LastMonthSelected
)
VAR
DaysLastMonthSelected
=
CALCULATE
(
COUNTROWS
(
'Date'
)
,
'Date'[DateWithSales]
=
TRUE
,
'Date'[Year Month Number]
=
LastMonthSelected
)
VAR
LastDayOfMonthWithSales
=
MAX
(
-- End of month of any month
31
*
(
DaysOnLastMonth
=
DaysLastMonthSelected
)
,
-- or last day selected with data
CALCULATE
(
MAX
(
'Date'[Day of Month Number]
)
,
REMOVEFILTERS
(
-- Removes filters from all of the
'Date'[Working Day]
,
-- filter-safe columns
'Date'[Day of Week]
,
-- to get the last day with data
'Date'[Day of Week Number]
-- selected in the report
)
,
'Date'[Year Month Number]
=
LastMonthSelected
,
'Date'[DateWithSales]
=
TRUE
)
)
VAR
PreviousYearMonth
=
LastMonthSelected
-
1
VAR
Result
=
CALCULATE
(
[Sales Amount]
,
ALLEXCEPT
(
'Date'
,
'Date'[Working Day]
,
'Date'[Day of Week]
)
,
'Date'[Year Month Number]
=
PreviousYearMonth
,
'Date'[Day of Month Number]
<
=
LastDayOfMonthWithSales
)
RETURN
Result
)
-
Page 234: Replace January with February in Tammy Metha example.
In the first paragraph the month for Tammy Metha game purchase is January instead of February.
The sentence:“Now focus on Tammy Metha: is she to be considered lost two months after her game purchase in February?”
Should read:
“Now focus on Tammy Metha: is she to be considered lost two months after her game purchase in January?”
-
Page 317: Correction to Total No Signs measure in StrategyPlan table
The code in the book is different than the code in the sample files, which is correct. The only difference is the highlighted line 18 in the following correct code.
1234567891011121314151617181920Total No Signs
=
VAR
BrowseLevel
=
[AccountBrowseDepth]
VAR
AccountName
=
SWITCH
(
BrowseLevel
,
1
,
SELECTEDVALUE
(
Account[Level1]
)
,
2
,
SELECTEDVALUE
(
Account[Level2]
)
,
3
,
SELECTEDVALUE
(
Account[Level3]
)
,
4
,
SELECTEDVALUE
(
Account[Level4]
)
,
5
,
SELECTEDVALUE
(
Account[Level5]
)
,
6
,
SELECTEDVALUE
(
Account[Level6]
)
,
7
,
SELECTEDVALUE
(
Account[Level7]
)
)
VAR
AccountType
=
LOOKUPVALUE
(
Account[AccountType]
,
Account[AccountName]
,
AccountName
)
VAR
ValueToShow
=
[Total]
VAR
Result
=
IF
(
AccountType
IN
{
"Expense"
,
"Taxation"
}
,
-
1
,
+
1
)
*
ValueToShow
RETURN
Result