4 Replies Latest reply on Feb 26, 2016 8:53 AM by Joshua Lecker

    Dynamic calculated field- based on action

    Abhilash Singh

      Hi All,

      I am trying to somehow apply action from my 'master table' to other charts in the dashboard where I want the bottom charts to show dates +- 3 days (or some range) from the value selected in the 'master table'

      So basically if I select 5th Jan 2015 from the top table is there any way to filter out products which are in the range +- 3 days from 5th Jan (i.e. 2nd Jan to 8th Jan.) Also the data is not continuous, meaning I do not have continuous dates, few dates are missing.

       

      In the attached workbook (Dummy), what I want is if I select a row in sheet 1, the sheet 2 should show rows in the desired range (for ex: +- 3 days).

      I know you cannot use the action filters inside calculated field, but is there a way around or can this be done using lookup, LOD or sets?

       

      I do not want to provide a filter or parameter to get this done. Actions are the only option.

      Any help would be appreciated! Thanks in advance.

       

      Jonathan Drummey Craig Bloodworth any ideas?

        • 1. Re: Dynamic calculated field- based on action
          Tableau kumar

          Hi Abhishek,

           

          I hope we can't define the calculations based up on the actions but We can achieve it by using the Combination of Parameter, Calculated fields.

           

          1) Create a Parameter & apply it to both Reports.

          2) Use the below calculated field in the CHILD report.

           

          if dateadd('day', -3 , [Date]) >= [Date_Parameter] and dateadd('day', 3 , [Date]) <= [Date_Parameter]

          then [Date] end

           

          3) Drag the all required fields onto work area,  then drag the above calculated field onto filter's shelf, then click on "Relative" then click on "Special", then click on "Non-null values".

          4) Now Parameter is part part of 2 reports, It controls the data in 2 reports.

           

          I did not verify it, just sharing my idea.

           

          Best Regards

          Tableau Kumar

          • 2. Re: Dynamic calculated field- based on action
            Abhilash Singh

            Hi Kumar,

            I am aware of how to do this using parameters etc. The only problem is my table is huge and since parameter does not show you relevant values, the list would be some 2000 records long.

            Anyways thanks for the reply!

            • 3. Re: Dynamic calculated field- based on action
              Calvin Wee

              Hi Kumar,

               

              I am interest in trying out Actions to +/-3 days filter but I am too new to understand your content.

              Given the below:

              Report A having all the transaction dates and Customers. An action will be send to Report B basing on Transaction Date and Customer.

              Report B having Customer, Product and transaction dates but the requirements is to restrict data using +/- of Report A Transaction Date and Customer.

               

              From your illustration,

              1) Create a Parameter & apply it to both Reports.

              What content should these parameters be? How to be push the Date selected as a parameter to Report B?

              2) Use the below calculated field in the CHILD report.

              if dateadd('day', -3 , [Date]) >= [Date_Parameter] and dateadd('day', 3 , [Date]) <= [Date_Parameter]

              then [Date] end

               

              Am I correct on the below in Report B?

              [Date] is Report B Transaction Date

              [Date Parameter] is the Transaction Date on Report A sending to Report B.

               

              Thanks

              • 4. Re: Dynamic calculated field- based on action
                Joshua Lecker

                I too am looking for a solution to this scenario.  My goal is allow the end user to select a record in one database table and be able to look for a corresponding record or records in the other database table, but the record could be delayed some 24 to 48 hours for countless reasons.

                 

                The solution by Kumar is not viable for me as the two reports come from two different data sources and I cannot apply the parameter across them both.  In addition, the date field is not the only filter field (location, category, etc...) used to create the 2nd data source's output, and having a solution that requires a user to click multiple items to get the 2nd list after they already had to for the first set will not be an acceptable solution from our approval team.