Creating the Cross-Prediction Query in DMX


  • Dear All ,

    Below is from help menu for cross prediction. If you want to change the product,we have to update. Do I need to do by hand every time? What about if I want do this for hundred regions? Each time I need to do it by hand and get the result. There should be an easy way ?Any idea please?

    SELECT ([All Regions].[Region]) as [Model Used], ('T-1000 Pacific') as [ModelRegion], (PredictTimeSeries([All Regions].[Avg Qty],5, REPLACE_MODEL_CASES)) as [Predicted Quantity] FROM [All Regions] PREDICTION JOIN OPENQUERY([Adventure Works DW2003R2], 'SELECT [ReportingDate] FROM ( SELECT ReportingDate, ModelRegion, Quantity, Amount FROM dbo.vTimeSeries WHERE (ModelRegion = N''T1000 Pacific'') ) as [T1000 Pacific] ') AS t ON [All Regions].[Reporting Date] = t.[ReportingDate] AND [All Regions].[Avg Qty] = t.[Quantity]

    • ย้ายโดย Darren GosbellMVP 29 พฤษภาคม 2555 5:50 this is a dmx question (From:SQL Server Analysis Services)
    25 พฤษภาคม 2555 16:16