1 Reply Latest reply on Dec 3, 2018 8:47 AM by Jim Dehner

    Getting proper count from calculated field

    Sebastian Lara

      Hello everyone,

       

      First, thank you for your help in advance. Much appreciated!

      Second, because this workbook includes sensitive information, I cannot include a packaged workbook, but will try my best to describe my issue as thoroughly as possible.

       

      I am trying to gather substring information from a field in the data (DETAILED_DESCRIPTION). I have so far:

       

      IF CONTAINS([DETAILED_DESCRIPTION], "hvd") = TRUE THEN "HVD Issue"

      ELSEIF CONTAINS([DETAILED_DESCRIPTION], "HVD") = TRUE THEN "HVD Issue"

      ELSEIF CONTAINS([DETAILED_DESCRIPTION], "Virtual Workspace") = TRUE

      THEN "HVD Issue"

      ELSEIF CONTAINS([DETAILED_DESCRIPTION], "virtual workspace") = TRUE

      THEN "HVD Issue"

      ELSEIF CONTAINS([DETAILED_DESCRIPTION], "Virtual workspace") = TRUE

      THEN "HVD Issue"

      ELSEIF CONTAINS([DETAILED_DESCRIPTION], "virtual Workspace") = TRUE

      THEN "HVD Issue"

      ELSE "No HVD Issue"

      END

       

      Great! So then I get the following result (122 corp id's with HVD incidents) when I plot by corporate id (CORP_ID):

      tableauscreenshot1.PNG

      Except there are only 644 distinct corpid's in the data, and the graph above adds up to 744:

      tableauscreenshot2.PNG

       

       

      How can I get a graph that shows me which corpid's had at least one HVD incident, and which had none at all, if this is not the way to do it (doesn't seem like it since the total count is 744 instead of 644?)

       

      Thank you!

        • 1. Re: Getting proper count from calculated field
          Jim Dehner

          You are doing a record by record check and breaking records into 2 groups - HVD and No HVD

          then you are coming back at the at the Corp ID level and asking which corp ID is in each group but there are some that have records in each group

          so what to do

           

          you can clay with an LOD (or not really needed) and take the Min(HVD Incicents)    (H is < N ) and just place the Corp ID in the viz

           

          jim

          If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.