Share via


Kpi.CreateNew method

Creates a key performance indicator (KPI) that is initialized with a random GUID.

Namespace:  Microsoft.PerformancePoint.Scorecards
Assembly:  Microsoft.PerformancePoint.Scorecards.Client (in Microsoft.PerformancePoint.Scorecards.Client.dll)

Syntax

'Declaration
Public Shared Function CreateNew As Kpi
'Usage
Dim returnValue As Kpi

returnValue = Kpi.CreateNew()
public static Kpi CreateNew()

Return value

Type: Microsoft.PerformancePoint.Scorecards.Kpi
A new KPI that is initialized with a random GUID.

Remarks

Use this method to create KPIs instead of using the constructor.

Examples

The following code example shows how to create a KPI.

Before you can compile this code example, you must do the following:

Kpi kpi = Kpi.CreateNew();
kpi.CreatedDate = DateTime.Now;
kpi.Name.Text = "KPI name";
kpi.Location = new RepositoryLocation("/BI Center/Lists/PerformancePoint Content", 2);

// TODO: Add error handling, validation checks, and return the new KPI object.

See also

Reference

Kpi class

Kpi members

Microsoft.PerformancePoint.Scorecards namespace