2 Replies Latest reply on Dec 19, 2017 8:08 AM by Kamal Tanwar

    Get Name when Availability is miniumum

    Kamal Tanwar

      Hi,

       

      I have a table where each person has a corresponding availability and belongs to a certain department. Now in my viz I'm averaging the availability by month and department.

      I want to write a function to display the name of the person with minimum and maximum availability in the tooltip.

       

      I'm not sure if this can be done with calculated field. Basically what I want is a WHERE clause

      Get Full_Name WITH min(Availability)

       

      Cheers,

      Kamal

        • 1. Re: Get Name when Availability is miniumum
          Zhouyi Zhang

          HI, Kamal

           

          try something like

          if

          Sum({Fixed datetrunc('month',[date field]),[department], [name]: sum([availability])}) =  Max({Fixed datetrunc('month',[date field]),[department], [name]: sum([availability])}) then

               min([Name])

          end

           

          and the same for the minimum.

           

          If you could share a sample workbook with your make up data will be more helpful

           

          ZZ

          1 of 1 people found this helpful
          • 2. Re: Get Name when Availability is miniumum
            Kamal Tanwar

            It did not work. The calculation is valid but when I put the field on tool-tip it doesn't show up any name )but of course there is a person with minimum availability). By the way I thought it could be much less shorter like this:

             

            IF AVG([Availability]) = MIN([Availability]) THEN

            MIN([Full Name])

            END