Skip to main content

Hello Tableau Community,

 

I am stuck on this LOD expression where I have successfully implemented an LOD expression that will give me a unique distinct count of the customer throughout the pane or cell:

{EXCLUDE [Date], [Customer] :COUNTD([Customer])}

In using this calculated field, I will derive the following results:

Using an LOD expression that will provide a Distinct Count across the Table and not the Pane or Cell. 

 

However, I would prefer to obtain a total distinct count across the table. This would be the desired results that I am looking to obtain:

 

image 

Attached is a tableau workbook pertaining to this issue. Any help or feedback would be greatly appreciated. Thank you for taking the time in reading this.

3 answers
  1. Jun 27, 2023, 5:07 PM

    @Clarence Plumm​ To get the desired result with LoDs, you will need to use a nested LoD.

    First you want a Distinct count of customers for each date. The you will sum those discounts for all the data (FIXED on no dimensions). The customer filter needs to be put into context, so the LoD does not count the customers who are filtered out.

    { SUM( { FIXED [Date]:COUNTD([Customer]) }) }

     

    James Emery

    Tableau Forums Ambassador

    Please click 'Select as Best' on the one reply that answers your question.

0/9000