2 Replies Latest reply on Jan 28, 2015 4:52 PM by Chris McClellan

    How do i use RAW SQL to create calculated fields in the backend that do not get affected by filters in the dashboard?

    Archana Amarnath


      I am facing a problem where in the values in my data are at two different levels.

      Sales amount- is at a product,region level (values gets repeated for every vendor)

      Discount amount-is at product,region,vendor level.

      if i want to calculate discount% by vendor af for product a,

      discount %= sum(discount by vendor af)/sum( total sales for product a)

      The denominator must remain constant irrespective of the vendor selected.

      Attaching the tableau file i was working with, and the backend excel data.

      The Columns highlighted in yellow are the ones i would like to get using RAW SQL itself.

      Please let me know if what i am trying to accomplish can be done without adding any additional columns in Excel.