2 Replies Latest reply on Feb 28, 2018 3:25 PM by Deepak Rai

    Eliminate record count issues when LOD changes

    MICHAEL CAROLAN

      Hi all - hope I can get some help...  I have a situation where I am required to sum all fields in a workbook.  I have it all worked out by using the following calculation:

       

      WINDOW_SUM(IIF(FIRST()==0, 1, IIF(ATTR([Customer Name])==LOOKUP(ATTR([Customer Name]), -1), 0, 1)))  that I was able to get from https://community.tableau.com/thread/109935

       

      tableau_issue.jpg

       

      Everything is GREAT until you get to the "Contact Order" in the above example.

       

      The "Assigned To" would have 4 distinct values, "DNR Reason" would be 1, but then the level of detail changes as there are different contact orders that apply to certain records.  "The "Contact Order" would return 7 instead of 2.  "Contact Type" in the above example returns 3 instead of the 2 that it should.

       

      I would attach a workbook - but it is REALLY kind of hairy in that it connects to two proprietary SQL databases - which I am not allowed to package.

       

      If SOMEONE could please help me out here - it would be awesome.

      Thanks,

      Mike Carolan