NETWORK.TRIADS OpenBI
The network's triads: patterns of three nodes, counted.
Group: Networks. OpenBI’s own: DAX has no function of this name.
Syntax
NETWORK.TRIADS ( <links>, <from>, <to> )
| Parameter | Type | Description |
|---|---|---|
links | Table | The rows that make the network, one link a row: a table of the model or a table expression, as the filters leave it. |
from | Expression evaluated for each row | One end of each row's link, such as a payer, a customer or a place. |
to | Expression evaluated for each row | The other end of each row's link. |
Returns
Table. 16 rows, one for each pattern, with the columns Triad, Count and Meaning (the pattern in words).
Remarks
- Every set of three nodes is counted under the pattern its links make: the triad census. The links are always directed, from the first end to the second.
- The code is the number of pairs linked both ways, of pairs linked one way and of pairs not linked, then a letter for the variants: 021D is one node paying the other two, 021U two paying one, 021C a chain.
- 030C is a ring of three, each paying the next; 030T has one node paying both others and one of them paying the third. 003 is three nodes with no link between them.
- The counts add up to the number of ways to pick three nodes. Compare them with those of random networks of the same size to see which patterns stand out.
Compared with DAX
An OpenBI function: DAX has none like it, so a measure or query that uses it works in OpenBI only, not in Power BI or Analysis Services.
Examples
The patterns among six accounts
Only the patterns that occur, without the Meaning column. The two rings show up as 030C.
EVALUATE
VAR Payments =
DATATABLE (
"Payer", STRING, "Payee", STRING, "Amount", INTEGER,
{
{ "A", "B", 100 }, { "B", "C", 80 }, { "C", "A", 60 }, { "C", "D", 50 },
{ "D", "E", 40 }, { "E", "C", 30 }, { "E", "F", 20 }
}
)
RETURN
SELECTCOLUMNS (
FILTER ( NETWORK.TRIADS ( Payments, [Payer], [Payee] ), [Count] > 0 ),
"Triad", [Triad],
"Count", [Count]
)
| Triad | Count |
|---|---|
| 003 | 2 |
| 012 | 10 |
| 021D | 2 |
| 021U | 1 |
| 021C | 3 |
| 030C | 2 |
Related functions
NETWORK.CYCLES, NETWORK.GRAPH, NETWORK.CLIQUES.
Open Graph, OpenBI's graph library, does the work: triad_census. See the OAX network functions and Open Graph.