2 Replies Latest reply on Jul 23, 2018 6:56 AM by Naman Bhardwaj

    Lookup function and aggregation in Tableau

    Naman Bhardwaj



      I have created a field using lookup function below...can i use this "field from" date as non aggregate??

        • 1. Re: Lookup function and aggregation in Tableau
          Jim Dehner

          Good morning


          Lookup() is a table calculation and can be used to return a value in table based on position - it can be used to return a date


          see below




          but as a table calculation you are at the bottom of the order of operation - so it can be used like this



          but not like this (in an LOD)





          If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.

          • 2. Re: Lookup function and aggregation in Tableau
            Naman Bhardwaj

            Hi John...let me talk about this in detail


            please help me solving this problem

            in attached tableau workbook i have created calculated field "from_date".. i want to create a dashboard where  for a suborder i want to check the delay in status flow

            so if my order is moving from one status to another status within 6 hours i will say that its within TAT otherwise delayed TAT

            like this there is another condition for moved and not moved

            i think am facing problem while creating "from_date" field

            all other calculations like "calculation 1", "calculation 2"," calculation 3" depends upon this field

            in workbook there are two sheets, one is raw data and other is pivot

            if i copy the cross tab of raw data sheet and paste than into excel and create pivot there it works fine but if i try to do same thing in tableau its not working

            i am struggling with either LOD or aggregate,Non Aggreagte

            for example in pivot sheet from_status "picked" to to_status "Invoiced" is providing the order count value "1873 under moved and beyond TAT"

            but if i just copy the cross tab in a excel and create pivot in excel then it will be actually 39 orders in "Moved and Beyond TAT" and 1838 in "Moved and within TAT"  which is right and what i want

            i hope you understand the problem

            attaching workbook