3 Replies Latest reply on Jan 12, 2018 8:48 AM by Paul Brainard

    Conditional Calculation

    Paul Brainard

      Hello Tableau Pros,

       

      I've got 3 Grant Types:

       

      HOPE/HOPE State Referred

      State BRS

      Federal RHY

       

      I want to be able to calculate Occupancy based on the Grant Type(s) filtered on.  If 1 grant type is selected I want my calc to multiply by 4, if 2 grant types are selected, multiply by 8, and if all three are selected then I want my calc to multiply by 12.

       

      Example - All three grant types selected, so my calculation looks like this:

      SUM([Bn Capacity Used])/([Days In Month]*12)

       

      I want the appropriate calculation to calculate based on the number of grants filtered by the user.  I've tried both CASE and IF statements, and neither is working for me.

       

      Thanks for taking a look,

       

      Paul