-
1. Re: SQL and Tableau Logic
Hari Ankem Apr 17, 2018 10:29 AM (in response to chowdary v)For the sample data you provided, you should also provide the expected output too.
Anyway, I feel that your business logic is both flawed and not clear. Please check the following statements:
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
1. What do you mean by Expected Revenue for the last month and current month? Do you mean the average/sum or something else?
2. Also, in the same line you have stated to use Matched Revenue with an "otherwise" clause. Isn't this conflicting with the 2nd line of your requirement?
3. When you state last month, do you plan to summarize the data at a monthly level and then consider the last month data, or consider the last month for each transaction at the date level.
4. What happens on 10th?