#47, #49 Using Customer vs. Sales table

This is a dedicated forum for people that have questions about the book Supercharge Power BI. In the event of errors in the book, the error information will be in this forum.
trc
Posts: 2
Joined: Thu Apr 19, 2018 10:29 am

#47, #49 Using Customer vs. Sales table

Postby trc » Thu Apr 19, 2018 10:41 am

My results were the same as the exercises in the book, but I did the CALCULATE over the Sales table and not the Customer table. When would my version 'break'?
e-book: CALCULATE([Total Sales] , All(Customers))
me: CALCULATE([Total Sales],ALL(Sales))

Thanks.

RamanaV
Posts: 14
Joined: Thu Oct 19, 2017 12:57 pm

Re: #47, #49 Using Customer vs. Sales table

Postby RamanaV » Thu Apr 19, 2018 1:34 pm

If you have a filter applied in your Matrix, say on Occupation (this is called Initial Filter Context), your formula returns same values as that of [Total Sales] by Occupation. The eBook formula, on the other hand, overrides the Initial Filter Context (using ALL over the Customers table), and returns [Total Sales] for all the customers, and you can see the same value displayed for all the rows in the column.

trc
Posts: 2
Joined: Thu Apr 19, 2018 10:29 am

Re: #47, #49 Using Customer vs. Sales table

Postby trc » Fri Apr 20, 2018 5:40 am

I think I'm understanding it better.
#1 - I got lucky because the initial filter context happened to be across the Customers table already, with no slicers activated. "Occupation <name> contributed x% to All Sales Made" (my formula) happened to match the answer for "Occupation <name> contributed x% to All Customer Sales" (ebook formula)
#2 - If a Country slicer had been added, Australia for example, my formula would have shown "Australia's Occupation <name> contributed x% to All Sales Made" while the ebook formula would have answered "Occupation <name> contributed x% to Australia's Sales".
my formula - the initial filter context (Occupation, Country) would be active throughout
ebook formula -the Occupation filter would be overridden while Country remains active during the CALCULATE()
#3 - make sure I am answering the correct question!


Return to “Help with the Book "Supercharge Power BI"”

Who is online

Users browsing this forum: No registered users and 1 guest

cron