Forum Discussion
Syndicate_Admin
5 years agoAdministrator
Quarter based on predefined date range
I have a reference table room for Quarter. In my main table (table 1) I have to get the quarter next to the date column.
For example
the date of table 1 is 20-3-2019 then quarter should get Qtr 1 2019. So it is to check all the rows and give the quarter.
| Start date | End date | room |
| 16-01-2019 | 15-04-2019 | Qtr 1 2019 |
| 16-04-2019 | 15-07-2019 | Qtr 2 2019 |
| 16-07-2019 | 15-10-2019 | Qtr 3 2019 |
| 16-10-2019 | 15-01-2020 | Qtr 4 2019 |
| 16-01-2020 | 30-04-2020 | Qtr 1 2020 |
You can create a column for Quater in current table with below code
Get_Quater = "QTR " & QUARTER(Quater_data[Start date]) &" "& YEAR(Quater_data[Start date] )Screenshot for your reference
1 Reply
- Samarth_18Community Champion
You can create a column for Quater in current table with below code
Get_Quater = "QTR " & QUARTER(Quater_data[Start date]) &" "& YEAR(Quater_data[Start date] )Screenshot for your reference