1 Reply Latest reply on Jan 15, 2019 3:48 PM by Naveen B

    How to create a calculation with one measure and two dimensions

    Incoming Thomas

      Hello - In this example I am trying to take the (Female Order Number / Male Order Number) -1 for all the observations that are classified as "New." Can anyone help me figure out how to do this? I think I would need to create a calculation. Thank you so much in advance

       

       

      Tableau Pic (1.15.19).PNG

        • 1. Re: How to create a calculation with one measure and two dimensions
          Naveen B

          Hi Thomas,

           

          To retrieve the Male with status as NEW use the below calc and name the calc as Male New Order Number

           

          IF Gender = "Male" and  status="New"

          THEN
          Order NumberEND

           

          To retrieve the Female with status as NEW use the below calc and name the calc as Female New Order Number

          IF Gender = "Female" and  status="New"

          THEN
          Order Number

          END

           

          Now you have two calculated fields you can do the division calculation since you didnt mention aggregation of Order i am assuming as countd

           

          (COUNTD(Female New Order Number)/COUNTD(ale New Order Number))-1

           

          This will do

          Hope this helps. Plz mark this answer as correct or helpful to close the thread

           

          BR,

          NB