1 Reply Latest reply on Jan 7, 2017 2:51 PM by Norbert Maijoor

    Calculated field creation

    Madhup Modi

      Hello guys, I am working on a Tableau project and am trying to create a calculated field. My data is in below format:

       

      System
      H1H2H3H4H5H6H7H8H9
      S12.490.451.450.351.680.32.51.261.14
      S2.4.4.35.37.5.43.76.31.24

       

      The field 'System' is the System Number and H1-H9 denote the hourly usage of the systems every hour.

      If hourly usage<0.2, then Hourly usage category is 'Low', if hourly usage is <.6 then Medium else High usage

       

      However, I need to identify a system as a Low/Medium/High based on the following logic: If a system has 'low' usage for highest # hours then laptop usage is low, if system has 'Medium' usage for highest # hours, then laptop usage is Medium and so on.

       

      For e.g, For System S1, usage is >0.6 for 5 hours (H1, H3, H5, H8, H9) and <0.6  for 4 hours (H2,H4,H6,H7). Hence, the laptop usage is 'High'. I would need to count the # occurances of usage being >0.6, <0.2 and b/w 0.2 and 0.6 and then identify the highest count. I am not able to come up with the formula to create this calculated field. Please advise