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:Sales AVG 30D := 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):Sales 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):Sales 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.
Total 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