OpenBI Docs Buy

NETWORK.WEAKPOINTS OpenBI

Single points of failure: the nodes and links whose loss alone splits the network, with the nodes and pairs each one cuts off.

Group: Networks. OpenBI’s own: DAX has no function of this name.

Syntax

NETWORK.WEAKPOINTS ( <links>, <from>, <to> [, <weight>] )
ParameterTypeDescription
linksTableThe rows that make the network, one link a row: a table of the model or a table expression, as the filters leave it.
fromExpression
evaluated for each row
One end of each row's link, such as a payer, a customer or a place.
toExpression
evaluated for each row
The other end of each row's link.
weightExpression
optional, evaluated for each row
How heavy each row's link is, such as an amount or a count; never negative. Left out, or given as the constant BLANK (), every row weighs 1.

Returns

Table. A row a weak point, the most harmful first. Its columns: Rank and Kind; Node for a node, or From and To for a link; Cut off, Pairs cut and Share cut; and Weight.

Remarks

  • A weak point is a node or a link that, lost on its own, breaks its part of the network into pieces: a single point of failure. Kind says which; a node fills Node, a link fills From and To.
  • Pairs cut counts the pairs of nodes that could reach each other before and no longer can (for a node, pairs of the other nodes); Share cut is that over every pair that could. Cut off counts the nodes left apart from the largest piece that remains.
  • The rows come with the most pairs cut first, then the most cut off, a node before a link, then in the nodes' order. Weight is a link's weight, or for a node the weights of its links added up.
  • The links are taken both ways: a link one way joins its two ends as a link both ways does. A network with no weak point returns no rows.
  • Rows where an end is blank, or where both ends are the same node, add no link; the end that is there still counts as a node.
  • Several rows between the same two nodes make one link, and their weights add up. Without a weight each row adds 1, so a pair that appears three times weighs 3.
  • With a weight, a row whose weight is blank or 0 adds no link either.
  • Nodes are compared the way OAX compares values: text without regard to case, and 1 and 1.0 are the same node. A node written two ways is shown with the spelling whose characters sort first by code (ALICE before Alice); a column of the model keeps one spelling of each text, the first it loaded.
  • In a measure, the table is the rows the filters leave, so the network follows the slicers and the page: a visual measures the network of the rows in view.

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

Where one failure splits the supply chain

The road from Plant B to Depot S is the worst single failure: Depot S, Shop 3 and Shop 4 lose the rest, half of all the pairs that could reach each other. Losing Plant B cuts off the same three, and its roads carry 55 pallets a day between them.

EVALUATE
VAR Chain =
    DATATABLE (
        "From", STRING, "To", STRING, "Pallets", INTEGER,
        {
            { "Supplier", "Plant A", 40 }, { "Supplier", "Plant B", 25 }, { "Plant A", "Depot N", 30 },
            { "Plant B", "Depot N", 10 }, { "Plant B", "Depot S", 20 }, { "Depot N", "Shop 1", 12 },
            { "Depot N", "Shop 2", 9 }, { "Depot S", "Shop 3", 14 }, { "Shop 3", "Shop 4", 6 }
        }
    )
RETURN
    SELECTCOLUMNS (
        NETWORK.WEAKPOINTS ( Chain, [From], [To], [Pallets] ),
        "Kind", [Kind],
        "Node", [Node],
        "From", [From],
        "To", [To],
        "Pairs cut", [Pairs cut],
        "Share cut", [Share cut],
        "Weight", [Weight]
    )
KindNodeFromToPairs cutShare cutWeight
Link(blank)Depot SPlant B180.520
NodePlant B(blank)(blank)150.41666666666666755
Link(blank)Depot SShop 3140.38888888888888914
NodeDepot N(blank)(blank)130.36111111111111161
NodeDepot S(blank)(blank)120.33333333333333334
Link(blank)Depot NShop 180.22222222222222212
Link(blank)Depot NShop 280.2222222222222229
Link(blank)Shop 3Shop 480.2222222222222226
NodeShop 3(blank)(blank)70.19444444444444420

NETWORK.CUTS, NETWORK.NODES, NETWORK.LINKS, NETWORK.FLOW.

Open Graph, OpenBI's graph library, does the work: biconnected_components, bridges, connected_components, strength. See the OAX network functions and Open Graph.

Last updated · OpenBI Studio 0.3.78