Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Solved! Go to Solution.
Hi @Prathyusika ,
Please try the below code:
Time Bucket =
SWITCH(
TRUE(),
[ClosedDate] >= WM_START_DATE &&
[ClosedDate] <= DATEADD(WM_START_DATE, 90, DAY) &&
TODAY() >= WM_START_DATE, "90 Days",
[ClosedDate] > DATEADD(WM_START_DATE, 90, DAY) &&
[ClosedDate] <= DATEADD(WM_START_DATE, 180, DAY) &&
TODAY() >= DATEADD(WM_START_DATE, 90, DAY), "180 Days",
[ClosedDate] > DATEADD(WM_START_DATE, 180, DAY) &&
[ClosedDate] <= DATEADD(WM_START_DATE, 270, DAY) &&
TODAY() >= DATEADD(WM_START_DATE, 180, DAY), "270 Days",
[ClosedDate] > DATEADD(WM_START_DATE, 270, DAY) &&
[ClosedDate] <= DATEADD(WM_START_DATE, 360, DAY) &&
TODAY() >= DATEADD(WM_START_DATE, 270, DAY), "360 Days",
TRUE(), "Greater than 360 days"
)
Best Regards,
Ajith Prasath
If this post helps, then please consider Accept it as the solution and give kudos to help the other members find it more quickly.
Hey, You can achieve this by
Time Bucket =
VAR WM_START_DATE = 'YourTableName'[WM_START_DATE]
VAR ClosedDate = 'YourTableName'[ClosedDate]
VAR Today = TODAY()
RETURN
IF(
ClosedDate >= WM_START_DATE &&
ClosedDate <= DATEADD(WM_START_DATE, 90, DAY) &&
Today >= WM_START_DATE,
"90 Days",
IF(
ClosedDate > DATEADD(WM_START_DATE, 90, DAY) &&
ClosedDate <= DATEADD(WM_START_DATE, 180, DAY) &&
Today >= DATEADD(WM_START_DATE, 90, DAY),
"180 Days",
IF(
ClosedDate > DATEADD(WM_START_DATE, 180, DAY) &&
ClosedDate <= DATEADD(WM_START_DATE, 270, DAY) &&
Today >= DATEADD(WM_START_DATE, 180, DAY),
"270 Days",
IF(
ClosedDate > DATEADD(WM_START_DATE, 270, DAY) &&
ClosedDate <= DATEADD(WM_START_DATE, 360, DAY) &&
Today >= DATEADD(WM_START_DATE, 270, DAY),
"360 Days",
"Greater than 360 days"
)
)
)
)
Thank you
Hi @Prathyusika ,
Please try the below code:
Time Bucket =
SWITCH(
TRUE(),
[ClosedDate] >= WM_START_DATE &&
[ClosedDate] <= DATEADD(WM_START_DATE, 90, DAY) &&
TODAY() >= WM_START_DATE, "90 Days",
[ClosedDate] > DATEADD(WM_START_DATE, 90, DAY) &&
[ClosedDate] <= DATEADD(WM_START_DATE, 180, DAY) &&
TODAY() >= DATEADD(WM_START_DATE, 90, DAY), "180 Days",
[ClosedDate] > DATEADD(WM_START_DATE, 180, DAY) &&
[ClosedDate] <= DATEADD(WM_START_DATE, 270, DAY) &&
TODAY() >= DATEADD(WM_START_DATE, 180, DAY), "270 Days",
[ClosedDate] > DATEADD(WM_START_DATE, 270, DAY) &&
[ClosedDate] <= DATEADD(WM_START_DATE, 360, DAY) &&
TODAY() >= DATEADD(WM_START_DATE, 270, DAY), "360 Days",
TRUE(), "Greater than 360 days"
)
Best Regards,
Ajith Prasath
If this post helps, then please consider Accept it as the solution and give kudos to help the other members find it more quickly.
User | Count |
---|---|
66 | |
60 | |
47 | |
33 | |
32 |
User | Count |
---|---|
86 | |
75 | |
56 | |
50 | |
45 |