Filter my DMX Association Algorithm Query
-
Tuesday, January 29, 2013 2:05 AM
Hi,
I've successfully created a mining structure and Association mining model. My next step is to run a prediction based on other data in our data warehouse. I've written the following DMX:
select flattened T.VisitKey, predict(Procedures, $PROBABILITY, INCLUDE_STATISTICS, INCLUDE_NODE_ID) from Procedure_Combinations prediction join SHAPE { openquery([BI Production Dev], 'SELECT distinct VisitKey FROM dm_Procedures_ToCheck order by VisitKey') } APPEND ( { openquery([BI Production Dev], 'SELECT VisitKey, ProcedureName FROM dm_Procedures_ToCheck order by VisitKey') } relate VisitKey to VisitKey ) as Procs_To_Check as T on Procedure_Combinations.VisitKey = T.VisitKey and Procedure_Combinations.Procedures.Procedure = T.Procs_To_Check.ProcedureNameThis query returns a row for every customer, regardless of whether or not a rule existed based on their current set of items in their "basket". How can I modify this query to eliminate the customers that do not have any results? I tried to add "where $probability >= ###" at the end of the query, but I just get an error.
Any help is appreciated.
Thanks,
Chris
All Replies
-
Thursday, May 16, 2013 7:05 PM
Chris
The where statement should work -- make sure you double-check your final syntax:
http://msdn.microsoft.com/en-US/library/ms132048(v=sql.110).aspx
Mark Tabladillo PhD (MVP, SAS Expert; MCT, MCITP, MCAD .NET) http://www.marktab.net
- Proposed As Answer by MarkTab marktab.netMVP Thursday, May 16, 2013 7:05 PM

