3 Replies Latest reply on Aug 9, 2017 1:39 PM by Ben Neville

# Totals still including filtered data

Peculiar thing.

I'm just challenging myself with LOD's for the exam and have ran into a weird thing.

I want to calculate the percentage of customers who have placed repeat orders for 2011 & 2012.

I have the total # of customers, I isolate the customers with orders on both years.  BUT everything I attempt from running_total, to count() to sum/window_sum() etc, are all including the filtered out customers.

I know I must be missing something.  I just wanted others thoughts to approach this dilemma.

Thanks.

PS. It's on version 10.3

• ###### 1. Re: Totals still including filtered data

The underlying issue is that table calculations are calculated AFTER totals. This means filters based on table calcs does not apply to totals. Your references are so convoluted (no offense meant - this has all the hallmarks of someone exploring calcs, and looks like many of mine after I've gone deep down some rabbit hole of LoD experimentation) that it's not really worth untangling the logic which has a calc refer to a table calc referring to an LoD. In either case, it doesn't matter as the root cause is the same.

• ###### 2. Re: Totals still including filtered data

Thanks Ben.

Something more for me to research.

Who knew a simple exercise would become a headbanger to determine how many of these customers are repeat customers.

I'm thinking my approach is all wrong...

• ###### 3. Re: Totals still including filtered data

Why not something as simple as COUNTD(IF {FIXED [Customer ID]: COUNTD([Order ID])} > 1 THEN [Customer ID] END)

or are you looking for more complex logic?