4 Replies Latest reply on Apr 16, 2018 9:07 PM by chowdary v

    Logic SQL and Tableau

    chowdary v

      Hi All,

       

      how to write below logic in SQL and tableau,

       

      In the SQL, Create new select columns called BlendedRevenue and BlendedRevenueRunrate. The logic for these columns is to pull either expected value (lead revenue)

      or revenue based on the product and date. Logic is:

      For Business loans, pull expectedLeadRevenue instead of matched count

      For Personal Loans and Auto Loans:

      -- if it is after the 10th of the month, pull expected revenue for the last month and current month, otherwise matchedRevenue

      -- if it is before the 10th of the month, pull expected revenue for last 2 months + current month

      for all other products, pull matched revenue.

       

       

      Thanks,

      Veeru