1 Reply Latest reply on Jan 23, 2019 8:53 AM by Jason Browning

    Format as per the values in segment

    Ranga Reddy  P

      Hi,

       

      Can we make only corporate in segment as normal values other than in % and $?

      Used the Sample data store data for this. Please suggest the possibilities to achieve.

       

       

      Regards

      Ranga Reddy P

        • 1. Re: Format as per the values in segment
          Jason Browning

          Hello,

           

          Tableau isn’t designed to apply formatting (save for some conditional formatting) at that granular of a level.  You could create calculated fields that “hack” the formatting together if you needed… but that will make it very difficult to do calculations later.  For example, you could apply the following to show each segment with a different format for profit:

           

                  IF ATTR([Segment]) = "Consumer" THEN STR(ROUND(SUM([Profit]))) + "%"

          ELSEIF ATTR([Segment]) = "Corporate" THEN STR(ROUND(SUM([Profit])))

          ELSEIF ATTR([Segment]) = "Home Office" THEN "$" + STR(ROUND(SUM([Profit])))

              END

           

          Notice the the rounding and summation would have to occur within the calculated field.  And you couldn’t use this field for further calculations.  If all you need is to format for presentation, this might work for you.

           

          See field “ProfitFormatted” in attached workbook.

           

          Thanks,

          Jason

          1 of 1 people found this helpful