The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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.)
User | Count |
---|---|
16 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
26 | |
13 | |
12 | |
8 | |
8 |