Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello all,
I have this kind of table below :
Order date | id | first use date |
11/01/2021 15:18 | id1 | 11/01/2021 10:11 |
11/01/2021 10:11 | id1 | 11/01/2021 10:11 |
12/01/2021 12:53 | id1 | 11/01/2021 10:11 |
09/02/2021 15:18 | id1 | 11/01/2021 10:11 |
15/03/2021 14:54 | id1 | 11/01/2021 10:11 |
15/04/2021 14:37 | id1 | 11/01/2021 10:11 |
17/05/2021 10:42 | id1 | 11/01/2021 10:11 |
01/06/2021 12:16 | id1 | 11/01/2021 10:11 |
07/01/2021 08:53 | id2 | 07/01/2021 08:53 |
06/02/2021 11:47 | id2 | 07/01/2021 08:53 |
11/03/2021 11:16 | id2 | 07/01/2021 08:53 |
and I want to add column with Flag, that indicate by users id if the order date is in the first month after first use (First use date+30days), or in the second the seconde month(Between First use date+30 and First use date+60), or in the third month(Between First use date+60 and First use date+90),etc... as the table below :
Order date | id | first use date | Flag |
11/01/2021 15:18 | id1 | 11/01/2021 10:11 | M1 |
11/01/2021 10:11 | id1 | 11/01/2021 10:11 | M1 |
12/01/2021 12:53 | id1 | 11/01/2021 10:11 | M1 |
09/02/2021 15:18 | id1 | 11/01/2021 10:11 | M1 |
15/03/2021 14:54 | id1 | 11/01/2021 10:11 | M3 |
15/04/2021 14:37 | id1 | 11/01/2021 10:11 | M4 |
17/05/2021 10:42 | id1 | 11/01/2021 10:11 | M5 |
01/06/2021 12:16 | id1 | 11/01/2021 10:11 | M5 |
07/01/2021 08:53 | id2 | 07/01/2021 08:53 | M1 |
06/02/2021 11:47 | id2 | 07/01/2021 08:53 | M1 |
11/03/2021 11:16 | id2 | 07/01/2021 08:53 | M3 |
Thank you for your help. I appreciate that.
Best,
Solved! Go to Solution.
@MF_BI Try:
Flag Column = TRUNC(DIVIDE(([first use date] - [Order date]) * 1.,30))+1
@MF_BI Try:
Flag Column = TRUNC(DIVIDE(([first use date] - [Order date]) * 1.,30))+1
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
80 | |
66 | |
58 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |