5 Replies Latest reply on Feb 13, 2019 7:54 AM by Norbert Maijoor

    Alignment of three mutually excluding measures

    Daniel de Amilivia

      Greetings,

      I'm not allowed to upload a workbook, so I'll try to be as clear possible.

       

      Many times I have to work with tables (coming from Excel) like this:

      ConceptJan 2019Feb 2019Mar 2019Apr 2019
      Deposit500.000510.000520.000530.000
      Deposit Rate5.5%6%6.5%7%
      Loan100200300400

       

      Which I transform into a data source with the columns: Concept, Month, Value.

       

      Then when showing this in Tableau, I have two different Calculated Fields referencing Value: Value_Number and Value_Percentage, which each of them has a different Number Formatting, depending on the Concept, something like:

      IF Concept = "Deposit Rate" THEN Value END

       

      I then drag both fields to the Text, which would show something like:

      ConceptJan 2019Feb 2019Mar 2019Apr 2019
      Deposit500.000
      NULL
      510.000
      NULL
      520.000
      NULL
      530.000
      NULL
      Deposit RateNULL
      5.5%
      NULL
      6%
      NULL
      6.5%
      NULL
      7%
      Loan100
      NULL
      200
      NULL
      300
      NULL
      400
      NULL

       

      But Tableau smartly hides those NULLs and aligns the numbers to the vertical center.

       

      Problem is when I need three different Calculated Fields, for example, for Value in Number, Value in Percentage and Value in Millions, or I need an AVG instead of a SUM in the third.

      In that case, Tableau doesn't hide those NULLs properly:

       

      Any ideas on how to implement this?

      So far I just created two sheets and put them one above the other, but there may be another way.

       

      Thanks,

      Daniel