OpenBI Docs Buy

NETWORK.PROPAGATE OpenBI

Risk spread from flagged nodes (personalized PageRank): each node's risk and rank.

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

Syntax

NETWORK.PROPAGATE ( <links>, <from>, <to>, <seeds>, <seed> [, <weight>] [, <damping>] [, <directed>] )
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.
seedsTableThe flagged rows the spreading starts from, such as FILTER ( Accounts, Accounts[Flagged] ).
seedExpression
evaluated for each row
The node of each row of seeds.
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.
dampingNumber
optional
Between 0 and 1: how far the risk travels before it goes back to the flagged nodes. 0.85 when left out; higher spreads it further.
directedBoolean
optional
TRUE when each link runs one way, from its first end to its second. FALSE or left out, a link works both ways.

Returns

Table. A row a node, the riskiest first, with the columns Node, Risk, Rank and Seed.

Remarks

  • Risk is the node's personalized PageRank: a walk along the links that starts again from a flagged node (each as likely) instead of jumping anywhere. Nodes close to the flagged ones, by many or heavy links, score high.
  • The risks add up to 1. Rank is 1 for the highest; Seed is TRUE for the flagged nodes.
  • Heavier links carry more of the risk. Directed, it flows only along the links' direction.
  • Seeds that are not nodes of the network are passed over; when none of them is, the call is an error.

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

Risk around one flagged friend

EVALUATE
VAR Links =
    DATATABLE (
        "From", STRING, "To", STRING,
        {
            { "Ann", "Bo" }, { "Ann", "Cy" }, { "Bo", "Cy" }, { "Cy", "Di" },
            { "Di", "Ed" }, { "Ed", "Fay" }, { "Di", "Fay" }, { "Fay", "Gus" }
        }
    )
VAR Flagged = DATATABLE ( "Person", STRING, { { "Ann" } } )
RETURN
    NETWORK.PROPAGATE ( Links, [From], [To], Flagged, [Person] )
NodeRiskRankSeed
Ann0.3037756216814241TRUE
Cy0.2449687926073362FALSE
Bo0.1985124637866773FALSE
Di0.1111636104119544FALSE
Fay0.07026584376333335FALSE
Ed0.05140501201632896FALSE
Gus0.01990865573294637FALSE

Following the money from D

Weighted by the amounts and directed: E, paid by D, carries the most risk after D itself.

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 }
        }
    )
VAR Flagged = DATATABLE ( "Account", STRING, { { "D" } } )
RETURN
    NETWORK.PROPAGATE ( Payments, [Payer], [Payee], Flagged, [Account], [Amount], 0.85, TRUE )
NodeRiskRankSeed
D0.2985098410364361TRUE
E0.2537333648809712FALSE
C0.194585855162993FALSE
A0.09021707830274214FALSE
F0.086269344059535FALSE
B0.07668451655733086FALSE

NETWORK.REACH, NETWORK.NODES, NETWORK.CENTRALITY, NETWORK.SIR.NODES.

Open Graph, OpenBI's graph library, does the work: personalized_pagerank_vs. See the OAX network functions and Open Graph.

Last updated · OpenBI Studio 0.3.78