Export (0) Print
Expand All
Avg
IIf
Lag
Max
Min
Mtd
Qtd
Sum
Var
Wtd
Ytd
Collapse the table of content
Expand the table of content
Expand Minimize

Predict (MDX)

Topic Status: Some information in this topic is preview and subject to change in future releases. Preview information describes new features or changes to existing features in Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2).

Caution note Caution

This function is in the process of being removed due to internal inconsistencies.

Review the example section for a workaround using a DMX expression.

Returns a value of a numeric expression evaluated over a data mining model.

Predict(Mining_Model_Name,String_Expression) 

Mining_Model_Name

A valid string expression that represents the name of a mining model.

String_Expression

A valid string expression that evaluates to a valid DMX expression for the specified mining model.

The Predict function evaluates the specified string expression within the context of the specified mining model.

Data mining syntax and functions are documented in Data Mining Expressions (DMX) reference.

Example

The following example predicts name of the cluster and the distance from it of a particular customer using the Customer Clusters mining model:

WITH MEMBER MEASURES.CLNAME AS 
PREDICT("Customer Clusters", "Cluster()")
MEMBER MEASURES.CLDISTANCE AS 
PREDICT("Customer Clusters", "ClusterDistance(Cluster())")
SELECT {MEASURES.CLNAME, MEASURES.CLDISTANCE} ON 0 
FROM [Adventure Works]
WHERE([Customer].[Customer Geography].[Customer].&[12012])

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2015 Microsoft