2 Replies Latest reply on Feb 21, 2019 1:45 AM by Magnus Lindh

    Calculation when using multiple databases and scaffolding (Tableau Version10.5.6)

    Magnus Lindh

      Hi,

      I'm stuck with a calculation problem. I have two different databases. One containing delivery data and one return (Repair) data. I have also added a Crossjoin Table used for scaffolding since my result must include all months even if no deliveries or return have been made.

      I have managed to make all calculations on highest level. As can be seen in sheet: Table and Table 2.

      In the picture below it's row 1 to 10.

      How to created calculation in row 12-15?

       

      The calculated field "Deliveries Months" uses the parameter Months to control a window_sum calculation.

      Example: Cell O3 is the sum of cells N2 and O2 if parameter Months=2.

       

      The Ratio on row 5 is calculated as "No of Returns"/"Deliveries Months"

       

      Each return will get a Fault Type 1-4.

      How to calculate "No of returns for each Fault Type"/"Deliveries Months"?

      Example: Cell I12 is calculated as I7/I3.

       

      Best regards

      Magnus

       

        • 1. Re: Calculation when using multiple databases and scaffolding (Tableau Version10.5.6)
          Patrick Van Der Hyde

          Hello Magnus,

           

          Thank you for the workbook.  I have been working at this for awhile and the use of Primary Diagnostic as  a linking field on Table view.  What is the original data source and is it possible to preprocess the data through Tableau Prep to clean it up?  I attempted to start this but one of the attached data sources is a hyber extract rather than a spreadsheet so I was unable to move forward with that idea. 

           

          Have you found anything to assist?

           

          Patrick 

          • 2. Re: Calculation when using multiple databases and scaffolding (Tableau Version10.5.6)
            Magnus Lindh

            Hi Patrick.

             

            Thanks for your reply.

             

            I haven't used Tableau Prep and I'm investigating if my company has bought license for it. So until when I would appreciate if you could find a solution that are independent of Tableau Prep.

             

            In my example all databases are xlsx files. In my real case The crossjoin file are a xlsx file and the other 2 txt files.

             

            Since my attached file seems to be giving you some problems I will attach a new one.

            It's almost the same as the previous one. The scaffolding file has some more dates.

             

            Just some information regarding my own progress. I'm investigating the possibility not using a scaffold file.

            I have almost solved it by not using the scaffold file but then I run into problem when filtering the view with a date lookup filter. All calculations are correct but the Area chart has some issues. This occurs for months where primary diagnostic is null.

            I have tried the yellow mark solution together with adding check for null in the calculated field. If null then 0. No success so far. I hope you can solve the scaffolding version. I think it also will solve the Area chart issue.

             

            Best regards

            Magnus