thank you for pointing me to the correct resource pack - for some reason my link did not go to quite the same location
Now, as to the problem with “Lifetime Sales” not equaling “Total Sales”
I believe the issue is due to the filter on “Year” in the filters pane:
“Lifetime Sales” will ignore the date filter - because that is what it is being told to do.
ALLEXCEPT is defined in the Microsoft docs as:
Removes all context filters in the table except filters that have been applied to the specified columns.
Here is the measure for Lifetime Sales (notice that ALLEXCEPT is referencing the Sales table as the table to REMOVE all context filters from, EXCLUDING the Customer Names column (which does not appear on the sales table, and I believe is an error that was introduced when the file was updated to a newer PBIX format).
Because Dates are on the Sales column, they are removed - so “Lifetime Sales” is behaving as it should in that instance.
However, it is NOT keeping the Customer Names filter, because that does not appear on the Sales table.
Lifetime Sales =
CALCULATE(
[Total Sales] ,
ALLEXCEPT( Sales , Customers[Customer Names] ))
I have added a new measure “Lifetime Sales 2” - which will still ignore the date filters, and now will keep the Customer Filters:
Lifetime Sales 2 =
CALCULATE(
[Total Sales] ,
ALL( Dates ),
ALLEXCEPT( Customers , Customers[Customer Names] ))
or, if you want to have the formula filter by Customer Name, AND Date, you would just use the original Total Sales
and here is how all three measures perform, with no date filter on the page:
and, if I return the 3 year filter to the filter pane: