Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Please hep me to create new field using the below logic
(If Status - A or B
Date- Last 6 month? )
Flag - Yes or No
Ex: if(match(Status,'A', 'B') and Last 6 month ,'Yes','No') as Flag
LOAD * INLINE [
ID, Status, Date
1, A, 9/16/2017
2, B, 10/28/2017
3, C, 11/12/2017
4, A, 12/13/2017
5, C, 1/15/2018
6, D, 2/8/2018
7, B, 4/22/2018
8, D, 4/17/2018
9, B, 5/16/2018
10, A, 6/2/2018
];
Did you forget about the first part of your if statement Match(Status, 'A', 'B')? Have you checked the status for those dates which don't get selected when you select Yes?
Or may be you need an OR condition
If(Match(Status, 'A', 'B') or Date >= AddMonths(Today(), -6),'Yes','No') as Flag1,
I tried this
If(Match(Status, 'A', 'B') or Date >= AddMonths(Today(), -6),'Yes','No') as Flag3,
It exclude only November
I am sure November neither have A or B as status and it is def. not within the last 6 months
My requirement is Last 6 months data contains A and B.
How is November in last 6 months? I am sure there may be a way to do this, but I fail to understand
November should not come, my questions is why Sep and October 2017 also coming, when the condition is Last 6 months.
The result should be Jan 2018 to Jun 2018
Because you changed the condition from and to or... so either a or b will be yes or last 6 months. I think Karan you need to go back and understand how if statement works. I clearly see that you are not able to follow the if statement logic. I am not sure how to help you with the if statement part my friend.