Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hello,
I have data in which there are two dates.I want to create a column based on If the month and year of both dates are same then to have "New Booking" else "Old Booking"
My data looks like below:
Date 1 | Sales | Date 2 |
12/01/2021 | 12472 | 18/01/2021 |
27/05/2021 | 34557 | 09/02/2021 |
15/06/2020 | 89345 | 19/03/2020 |
My Outcome would look like this:
Date 1 | Sales | Date 2 | Status |
12/01/2021 | 12472 | 18/01/2021 | New Booking |
27/05/2021 | 34557 | 09/02/2021 | Old Booking |
15/06/2020 | 89345 | 19/03/2020 | Old Booking |
Solved! Go to Solution.
Something like this should work:
Status = IF( AND( YEAR([Date1]) = YEAR([Date2]), MONTH([Date1]) = MONTH([Date2])), "New Booking", "Old Booking" )
Something like this should work:
Status = IF( AND( YEAR([Date1]) = YEAR([Date2]), MONTH([Date1]) = MONTH([Date2])), "New Booking", "Old Booking" )
User | Count |
---|---|
130 | |
108 | |
101 | |
67 | |
62 |
User | Count |
---|---|
137 | |
115 | |
102 | |
71 | |
61 |