2 Replies Latest reply on Aug 26, 2018 6:32 PM by Allen Carreon

    Data Labels

    Allen Carreon

      I'm trying to remove decimal places for other categories in stacked bar graph (1 out of 4, 2 out of 4 and 3 out of 4) while leaving 1 category in 2 decimal places (4 out of 4). Changing the format of decimal places will change all categories. Is there anyway to do this? thanks!

       

        • 1. Re: Data Labels
          Simon Runc

          hi Allen,

           

          So one way to do this is create 2 separate calculations for each level, and then set formatting differently.

           

          In the attached I created

          [Consumer - Label 2dp]

          IF [Customer Segment] = 'Consumer' THEN [Discount] END

           

          and

           

          [Other Segment - Label dp]

          IF [Customer Segment] != 'Consumer' THEN [Discount] END

           

          As there is no ELSE part the FALSE condition equates to NULL, and NULLs are blank in labels, so we never get both showing on the same mark.

           

          and bring them both onto the label tile, and set the formatting differently.

           

          Hope that helps

          • 2. Re: Data Labels
            Allen Carreon

            Thanks a lot Simon. It worked perfectly!