Double number representation

GiulioRossi
GiulioRossi Registered Posts: 6 ✭✭✭✭

Hi,

I have several columns being imported as double where the format is X.XXXXXX0N where 0N is the exponential

How can I show the number as it is (not Exponential) I am not interested in rounding the number.

secondly is it possible, without rounding the number to limit the values shown after the comma but keeping the full number precision?

Answers

  • VinceDS
    VinceDS Dataiker, Alpha Tester, Dataiku DSS Core Designer Posts: 45 Dataiker
    edited July 17

    Hi,

    In a Prepare recipe, you can try to reformat your column using the Formula processor with something like:

    format(‘%.Xf’, COLUMN_NAME)

    ... X being the number of digits you want to show (it helps if your digit length is the same across rows)

  • GiulioRossi
    GiulioRossi Registered Posts: 6 ✭✭✭✭
    edited July 17

    This is changing the type into a string assuming

    format(‘%.Xf’, COLUMN_NAME)

    instead of

    format("%.Xf", COLUMN_NAME)

    which generated an error.

    I do not need to change format I need just sot SEE lees precision but keep the number as a double with the full prevision stored in the table

    @VinceDS

  • VinceDS
    VinceDS Dataiker, Alpha Tester, Dataiku DSS Core Designer Posts: 45 Dataiker

    Indeed.

    If it's just to display then can you create an additional column with that formula? Here is an example output I was able to generate

    Screenshot 2020-01-21 at 11.55.47.png

  • GiulioRossi
    GiulioRossi Registered Posts: 6 ✭✭✭✭

    @VinceDS

    thanks Vince for the work around

    I hope DataIku fixes this gap

    I understand a workaround but the user should be able to review and change how data appears without changing the format of underlying data or creating multiple columns for each format needed....

    every time have to deal with amounts i have to carry twice the columns in each table...

  • Manuel
    Manuel Alpha Tester, Dataiker Alumni, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Core Concepts, Dataiku DSS Adv Designer, Registered Posts: 193 ✭✭✭✭✭✭✭

    Hi Giulio,

    What would be your preferred solution, display decimals with a default number of digits?

    Thanks

  • GiulioRossi
    GiulioRossi Registered Posts: 6 ✭✭✭✭

    Yes @Manuel

    without having to round or convert the underlying number in the table

    viewing 123,234,324.35 or123,234,324.34 (do not mind the visual rounding)

    were the number is actually 123234324.348763456734 and is not rounded for calculation purposes

    rather than viewing 1.2323432434876345E8

  • MarkPundurs
    MarkPundurs Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Registered Posts: 27 ✭✭✭✭

    The best solution would be a field menu item offering display format options, including an option to specify a custom format.

Setup Info
    Tags
      Help me…