Modifier

Partager via


set_intersect()

Applies to: ✅ Microsoft FabricAzure Data ExplorerAzure MonitorMicrosoft Sentinel

Returns a dynamic array of the set of all distinct values that are in all arrays - (arr1 ∩ arr2 ∩ ...).

Syntax

set_intersect(set1, set2 [, set3, ...])

Learn more about syntax conventions.

Parameters

Name Type Required Description
set1...setN dynamic ✔️ Arrays used to create an intersect set. A minimum of 2 arrays are required. See pack_array.

Returns

Returns a dynamic array of the set of all distinct values that are in all arrays.

Example

range x from 1 to 3 step 1
| extend y = x * 2
| extend z = y * 2
| extend w = z * 2
| extend a1 = pack_array(x,y,x,z), a2 = pack_array(x, y), a3 = pack_array(w,x)
| project set_intersect(a1, a2, a3)

Output

Column1
[1]
[2]
[3]
print arr = set_intersect(dynamic([1, 2, 3]), dynamic([4,5]))

Output

arr
[]