4 Replies Latest reply on Dec 11, 2018 8:26 AM by Laurence Turner

    Dynamically change number format with parameter data-type choice

    Laurence Turner

      Hi All,

       

      I have a parameter that allows the user to choose between four measures are shown on a bar chart, this is applied using the following calculated field:
      IF [Data Type] = "USD, millions"

      THEN [Value]

      ELSEIF [Data Type] = "Number of Records"

      THEN SUM([Number of Records])

      ELSEIF  [Data Type] = "Per cent of total value, USD, millions"

      THEN [Per cent, value]

      ELSEIF [Data Type] = "Per cent of total number of records"

      THEN [Per cent, number of records]

      END

       

      I would like to show each of these data types with different levels of decimal precision:

      - Value (USD, millions) 0 DP
      - Number of Records 0 DP
      - Per cent of total value 2 DP

      - Per cent of number of records 2 DP

       

      Is there a way to manipulate a calculated field to do this?

       

      Thanks,
      Laurence