2 Replies Latest reply on Aug 8, 2016 8:04 PM by Duong Vu

    Can I use Lookup as Vlookup (Excel)?

    Cau? Brito

      Hello,

       

      I'm using a Data base from a Query (SQL) and I need take some informations. (I can't change the Data Base as in the Excel...)

      For example, There's a Column called "ID" (it's the number of a process) and an other Column called "Amount" (it's the number of people in the process), all the process have a open date and close date. Each ID has a number of rows according the number of people with differents datas, but the number of ID and Amount repeats every row, only personal informations don't repeat. I wanna know the number of "Amount" per month, thinking that the number of "Amount" can repeat. If i use the function COUNT I'll have "Amount"=8, if i use the function COUNTD=2... For exemple :

       

      ID, Amount

      1      3

      1      3

      1      3

      6      2

      6      2

      8      3

      8      3

      8      3

       

      Can I use some function similar VLookUp: Example : Vlookup('ID',[data base],2) ??

       

      Sorry my bad English,

       

      Regards,

       

      Cauê

        • 1. Re: Can I use Lookup as Vlookup (Excel)?
          Jonathan Drummey

          I don't know of any vlookup function in Tableau, but I think there's another way to do this: You can create a table calculation such as WINDOW_AVG(AVG([Amount])) and set the Compute along ID and Date. This will cause Tableau to perform the average calculation for each ID and date, and since all the results are the same for the given ID/date combination (I assume) then you will have the correct result. I've attached a workbook that shows this. The one thing I still have difficulty with in table calcs is that they can return multiple values, like this one does, even though all the values are the same.

          • 2. Re: Can I use Lookup as Vlookup (Excel)?
            Duong Vu

            dear Mr. Jonathan

            I have same issue with Mr Cau.

            it is like that :

            we have 1 table data

            date               Item     Q'ty

            1/1/16               A          1

            1/1/16               B          2

            1/2/16               A          5

            1/2/16               C          7

             

            Request to find as same :

            item          1/1/16

            A               ????

            B               ????

            C               ????

            D               ????          D: don't have in table, but still need display value 0 , this request is easy if we use vlookup in excel.