4 Replies Latest reply on Feb 12, 2019 3:38 PM by Zhouyi Zhang

    Need help with problem

    Sushobhan Das

      RAW DATA Sample ---

      Node_Name,IsVirtual,CPU_Count,OS_Type

      Server1,TRUE,4,Linux

      Server2,FALSE,6,Windows

      Server3,UNKNOWN,2,Linux

      Server2,FALSE,6,Windows

      Server1,TRUE,4,Linux

      Server4,TRUE,8,Solaris

       

       

      Analysed Data  ---

      OS_Type,IsVirtual=TRUE,IsVirtual=FALSE,IsVirtual=UNKNOWN,CPU_Count(Total across Servers)

      Linux,1,,1,6

      Solaris,1,,,8

      Windows,,1,,6

       

      Can someone help me how to go about solving the issue?

        • 1. Re: Need help with problem
          Jennifer VonHagel

          Hi Sushobhan,

           

          Assuming that once in Tableau, your IsVirtual field is a boolean...

           

          You can create these calculations to turn the boolean values TRUE, FALSE, NULL each into its own field with a "1" or NULL signifying it applies:

          And set up your view:

           

          Hope this helps,

          Jennifer

          • 2. Re: Need help with problem
            Sushobhan Das

            Thanks a lot Jennifer. Your quick reply is much appreciated.

             

            Unfortunately, I found that I have one more row in the dataset which I missed. Here is the complete dataset ---

             

            RAW DATA Sample ---

            Node_Name,IsVirtual,CPU_Count,OS_Type

            Server1,TRUE,4,Linux

            Server2,FALSE,6,Windows

            Server3,UNKNOWN,2,Linux

            Server2,FALSE,6,Windows

            Server1,TRUE,4,Linux

            Server4,TRUE,8,Solaris

            Unassigned,0,0,0

             

            I also found that I can not change the datatype to BOOLEAN. How do I solve the issue in that case?

             

            Also, please note that CPU_Count in your solution does not show the value I am expecting.

            • 3. Re: Need help with problem
              Jennifer VonHagel

              Hi Sushobhan,

               

              Regarding your field not being Boolean, no problem. The IF statements work just as well with strings, so these fields can now be:

               

              MAX(IF [Is Virtual] = 'TRUE' THEN 1 END)

              MAX(IF [Is Virtual] = 'FALSE' THEN 1 END)

              MAX(IF [Is Virtual] = 'UNKNOWN' THEN 1 END)

               

              Regarding the CPU count not showing what you're expecting, you'll have to provide more information on the logic you want to happen here. Under what circumstances do you want the cpu count to be "Total across Servers")?  What issue are you trying to solve for, or what steps have you taken to get to your end result that you're trying to replicate in Tableau?

               

              Regarding the extra row with "Unassigned", what is meant to be done with it?

               

              Best,

              Jennifer

              • 4. Re: Need help with problem
                Zhouyi Zhang

                Hi, Sushobhan

                 

                Please refer to my solution attached as well as below screenshot.

                 

                 

                Hope this helps

                 

                ZZ