4 Replies Latest reply on Mar 15, 2016 10:52 AM by ann.stolzman

    Calculating fare estimate

    Seona Joung

      I am working on a dashboard that shows fare estimate from a starting point (start) to a hospital by taking uber. I created two parameters that lets you select which hospital to go to and which uber to take. Then created calculated fields that shows the distance depending on the hospital and another one that shows how much it is per mile depending on the uber type. Then I created another calculated field 'fare estimate' to show the estimate (distance x rate per mile) and the formula is valid but not showing anything when I drag it to the view. I think the key problem is to get the 'per mile' data from the uber type dataset.


      Below are my calculated fields..



      case [Hospital]

      when "4601 Martin Luther King Jr Ave SW, Washington, DC 20032" THEN [Distance1]

      when "1310 SOUTHERN AVENUE SE" then [Distance2]




      case [uber_type]

      when "UberBLACK" THEN ATTR([estimate (estimate)].[Per Mile])

      when "UberSUV" THEN ATTR([estimate (estimate)].[Per Mile])

      when "uberX" THEN ATTR([estimate (estimate)].[Per Mile])

      WHEN "uberXL" THEN ATTR([estimate (estimate)].[Per Mile])

      when "uberX + Car Seat" then ATTR([estimate (estimate)].[Per Mile])




      fare estimate





      What am I doing wrong in the calculations and is there a better way to approach this problem? (Attached my workbook)


      Any feedback would be appreciated.


      Thank you!