Note: Forums will be making significant UX changes to address key usability improvements surrounding search, discoverability and navigation. To learn more about these changes please visit the announcement which can be found HERE.
Filter my DMX Association Algorithm Query

Proposed Filter my DMX Association Algorithm Query

  • Tuesday, January 29, 2013 2:05 AM
     
      Has Code

    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.ProcedureName

    This 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