'kusto query - i want exclude 2nd and 4th Saturday along with Sunday on chart
i want exclude 2nd and 4th Saturday along with Sunday on chart.
i am trying this code but its not working it gives an error -
Relop semantic error: SEM0025: One of the values provided to the 'in' operator does not match the left side expression type 'timespan', consider using explicit cast
| extend Eventdate = strcat(datetime_part("day",timestamp))
| extend day = dayofweek(timestamp)
| extend day_strg = tostring(Eventdate)
| extend Week_Num = case(
day_strg in (range(1, 7, 1)), "1",
day_strg in (range(8, 14, 1)), "2",
day_strg in (range(15, 21, 1)), "3",
day_strg in (range(22, 31, 1)), "4",
"0")
| extend weekend = case(Week_Num in (2, 4) and day in (5, 6), "weekend","working day")
| project Eventdate, timestamp, day, day_strg, Week_Num, weekend
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|