1 Reply Latest reply on Jun 29, 2016 2:11 PM by Yuriy Fal

    Grouping based on lookup condition

    Javier Guillen



      I need to perform the following operation:


      1.  Check to see if an Orders table has matching orders with another table in a different database

      2.  For those matching orders, assign a group (say, Group A)

      3. Unmatched orders go to Group B

      4. Create a chart with total count of rows per Group



      Normally, I would do this as a left outer join SQL query, however this operation must occur over different databases (and cross-db join only supported in upcoming Tableau 10).   Due to this, I tested blending the tables, and performing a conditional statement like:



         NOT ISNULL(ATTR([Second Source].[order]))


          "Group A"


          "Group B"




      That works for grouping orders, as long as Order is specified in the visualization.  And here is the issue, I don't want the chart to display order, but the total of the groups.  Adding order to the visual allows for the grouping, but the group total is replaced by order totals.    If, in the other hand I remove order from the visual (or the details), the grouping does not work any longer.


      LOD expressions do not seem to work either as they must come from a single source.


      Is there a work-around or a way to make this happen?