1 Reply Latest reply on Jul 5, 2016 12:42 AM by Dmitry Chirkov

    Creating a calculation based on two different conditions - a challenging use case.

    Michelle Jones

      Hello everyone - I'm having trouble figuring out how to fulfill some strict requirements that have come my way and wanted to see any of you have experienced a similar use case or might offer some assistance in how to solve this in Tableau.

       

      For privacy, I will use the super sales data and the attached workbook to demonstrate. I am displaying profit ratio (SUM([Profit])/SUM([Sales])) by state and would like to update the view to achieve the following goals:

       

      1. I want to display the profit ratio for Massachusetts based only on the sub-category of 'Machines'
      2. All other state's profit ratio should be based only on the sub-categories of 'Paper', 'Phones' and 'Storage'.

       

      I've played with LODs and table calcs and have struggled to come up with a solution - any thoughts?