Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi everyone, I have a problem, that is, I should calculate the quarters with respect to connected columns. The columns are Name, first date and second date.I think that is very difficult, but I try to explain
| Name | First Date | Second Date | Quarter |
| XXXX | 31/05/2018 | 30/06/18 | 0 |
| XXXX | 31/05/2018 | 30/06/18 | 0 |
| XXXX | 30/06/2018 | 30/06/18 | 1 |
| XXXX | 30/06/2018 | 30/06/18 | 1 |
| XXXX | 30/06/2018 | 30/06/18 | 1 |
| XXXX | 31/10/2018 | 30/06/18 | 2 |
| XXXX | 31/10/2018 | 30/06/18 | 2 |
| YYYYYYYY | 31/05/2018 | 30/06/18 | 0 |
| YYYYYYYY | 31/05/2018 | 30/06/18 | 0 |
| YYYYYYYY | 31/05/2018 | 30/06/18 | 0 |
Thank you
Carlo
@Carlo1975 , Create a new column like
Switch( true(),
[First Date]<[Second Date], 0 ,
[First Date]=[Second Date], 1 ,
[First Date]>[Second Date], 2
)
I'm sorry but is wrong...if you look my example, when the first date is 30/10/2018, the quarter is 2, but, if for example I have also another data like 31/01/2019, the quarter will be 3, and if I have also 31/04/2019 the quarter will be 4....and so on until the name change. Each 3 month, from the first date is equal or greater than the second date, I have to add 1 (quarter 1, quarter 2, quarter 3, quarter 4, quarter 5, etc.)
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 4 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 17 | |
| 8 | |
| 8 | |
| 7 |