I mined a small-size table using TimeSeries. There are only 3 columns in the mining model : payment, region_name, and period. Payment is of type floating-point designated as predicted column, region_name is of type string/text designated as key, period is of type numeric(6) with year and month designated as key time. Build and deployment are successful. The value of period spans from 200501 to 200603, with PERIODICITY_HINT is set to {12}.
(1) However, the viewer displays the result in percentage, not the values of column payment.
How can I instruct the viewer (or Visual Studio) NOT to display it on percentage?
(2) Two key-values are missing. In the data, there are 8 key-values. But the viewer displays only 6 of them. How can this be?
I've saw many tutorials about using TimeSeries. But all of them using a table. But I'm using a cube to represent data. So I'm trying to build forecast from cube, but it doesn't so good as in could be. I've got the same problem as desribed in Microsoft's tutoral Adventure work. So I need to forecast a series of sales. The problem is that I can't create second key value, as it shown in tutorial. So I can't split good's sales. I have created dimentions for goods and for time. So cube's browser shows me very handsome view, but the problem with mining model still remains... Please, help me! How can I solve this problem? Can I create a separate table from cube to build forecast by this table? Or I can solve this problem not using tables?
Revenue 4 GB (4086 MB) Partitioned into 12 partitions (about 340 MB each) The count of records : almost 16.8 millions Each partition has approximately 1.4 million records
Algorithm chosen : TimeSeries Time Key : Period (6 digits integer with values range from 200501 to 200512, integer values) (Non-time) Key : Telephone number, variable-length string/text, max 15 char Input-and-predicted column1 : SLI007 Input-and-predicted column2 : SLI008
I have set the value for PERIODICITY_HINT to {12}. I created the project 3 times in 3 machines. All fail. The error message is the same :
Internal error : An unexpected exception occured. Internal error: An unexpected error occurred (file 'dmtimeseries.cpp', line 646, function 'DMTimeSeries::ProcessCaseTS3and4').
I searched for the file in C:Program FilesMicrosoft SQL Server and its subfolders. I didn't find it.
What causes the error?
I tested 3 machines to check whether the performance of the machine is the culprit.
Single processor Pentium M 2.0 GHz with 2 GB Memory Double processor Xeon 2.4 GHz with 3 GB Memory Double processor Xeon 3.4 GHz with 4 GB Memory
But the project in all those machines return the same error. Any idea?
Using the TimeSeries algorithm, how do I forecast more than one time period ahead? I read in you book on page 182 that PredictTimeSeries function can take a parameter for the number of time periods you want to predict. Fore example, SELECT PredictTimeSeries(Bread,5) tells the algorithm to predict the next 5 time periods. Can you tell me how to change that parameter using the graphic interfaces?
hi,I am a novice SSAS Programmer.I need a prediction Query in time series algorithm, so that it should predict for a particular date.I dont know how to use where condition in a prediction Query.
First of all I would like to politely greet everybody as I'm new on that forum and new to Data Mining in fact.
To introduce myself I can say I'm a student of Computer Science and I'm trying to use Time Series algorithm for weather analysis. I know that forecasting weather is a hopeless task even for the fastest computers in the world but what I'm trying to do is a kind of aposteriori analysis of historical data to notice some dependencies or characteristic weather behavior on a specified region and perhaps make some short time predictions.
I tried Time Series Algorithm although I have some doubts about methodological justification of this choice (if You have any critical comments please share them with me). But my main questions are about the usage of the algorithm itself:
I've read the documentation and a tutorial on this page for historical predictions but I still don't know what exactly are HistoricalModelCount and HistoricalModelGap. I know that my historical predictions are bounded by a €“ HistoricalModelCount*HistoricalModelGap*, but it's a rather operational knowledge... The explanation is always clouded with an €śinternal model€? phrase. Can You point me to a document where I can find some more detailed information? (What is the form of the model? How is it built? etc.)
Periodicity Hint. How should I treat these optional values? Are they other possible periods of data? I have data about weather measurements made every six hours for thirteen years** so is it a good choice to set this parameter to {365*4,4} (The first goes for a year and the second for a day)?
This is a technical question and I'm really ashamed of myself that I bother You with it. On the time chart in a model Viewer I can see date from the last year only. Zooming out/in, clicking insanely on every pixel on the screen, did not give any result (apart of broken mouse buttons). Is is possible to browse that data in mining model viewer chart? Thank You in advance for Your replies!
*This formula suggests how this parameters could work but I would like to know it for sure €“ don't want to make some awful mistakes in my project. :-) **Of course I plan to reduce the amount of data but the period will stay.
The first question is how to of TimeSeries Algorithm?
Using SQL Server 2005 TimeSeries Algorithm ,I build a data mining model.But after three days,it is still training.The data has 2,200,00 rows.
So what can i do to improve the processing speed.
Thanks!
The second question is parameters in Data Mining Query Task.
Data Mining Query Task is used to get data from data mining model.In the mining model form, i choose a mining model . And in the query form,i wrote a dmx ,"select flattened top 100 predicttimeseries([Xssl],1) from [Time Series XSSL]".Last i choose a table that is for the data from mining model.
I need to write a page that figures out the percentage of students passing an assessment item where students are from a particular school, grade, gender, and are not medically exempt. I did a Count Statement on all test taker, and another Count Statement for the number passing the item who were not exempt. Both of the statements are shown through seperate datalist controls. I then want to get the percentage by dividing the number passed by the number taken and mulitplying that by 100. Is there a better technique or can I do this in a sql statement somehow?
I am havingSELECT DISTINCT Name, (( count(id_Name) * 100 ) / (SELECT count(id_Name) AS tt FROM dbo.Name)) as PercentageFROM dbo.NameGROUP BY Namebut I get only integers : 1,0,4,12I need : 1.63, 0.4, 4.05, 12.78how can I do it ?is there a better way to calculate a percentage ?thank you
Hello!I have a need to create a function that will return a sublist ofelements from a table based on an associated column value and itsranking within the table (based on a percentage range).To expand with a simple example (only 4 elements):Element | Value---------------A102 | 5A506 | 10A322 | 15A342 | 20I would like to be able to return the range of elements that lie in the50-75% value range (e.g. third quartile range). Therefore with onlythese four elements I would want to return the element code 'A322'.I have attempted to achieve this by using SELECT TOP n PERCENT. I canbring back the required range by combining two select percentstatements.SELECT Element from ELEMENT_TABLEWHERE Element IN(SELECT TOP 75 PERCENT Element FROM ELEMENT_TABLE ORDER BY Value)AND Element NOT IN(SELECT TOP 50 PERCENT Element FROM ELEMENT_TABLE ORDER BY Value)The problem is that I cannot seem to pass a variable to this percentageso if I want another percentage range set, I ave to define anotherfunction.My question therefore is does anyone know either(1) a way I can pass a variable (n) to these SELECT n PERCENTstatementsOR(2) an alternative way of doing this?Many thanks!Andrew
Hi team, I have a column 'a' of a table in which i would like to calculate a percentge of all entries in that column 'a' and place the results in a column 'c' beside column 'a'. Can this be done in sql server ??
Lets say I have a table called ProductProductId Name Price Category1 Table 20.00 Furniture2 Chair3 Lamp Misc What is the SQL command that would give me as a percentage the completeness of a row, either complete or empty?For e.g. SELECT ... FROM Product WHERE ProductId = 2 ; should give a result of 50% as half the Columns in that row are empty.e.g. SELECT ... FROM Product WHERE ProductId = 3 ; should give a result of 25% as 1/4 of the Columns in that row are empty.I tried used something like SELECT COUNT(COLUMN_NAME) AS Expr1FROM INFORMATION_SCHEMA.COLUMNSWHERE (TABLE_NAME = 'Product')but dont know how to go forward.
Ok guys, here is my query GridSqlDataSource1.SelectCommand = "SELECT *, (([WinSum])/(([WinSum]) + ([LossSum]))) AS WinPercent FROM [ResultsView] WHERE ([CDIV] = @CDIV) ORDER BY [CTEAM]" I need it to give me a 3 decimal percentage for WinPercent, but right now it is giving me 0 because as an example: 6 / 7 = 0 instead of 0.857 Any ideas?
I am in need some uinderstanding of how to return the percentage of calls that were closed, between 1, 2 ,3, 4 and 5 days (possibly extendable to catch all those that were holding on to jobs to make it look like the were busy) as well as including all open jobs.
Because of my newbie status I am stumped at how to even start a query of this magnitude, and no this is not a school assignment :-) just some one who is very new to T-SQL and wanting to learn how to extract data from an MS SQL database server, as I find it fascinating, also my bosses find it fascinating the type of data I am returning for them so far.
So enough waffling.
This query will be run through VBA, any variable(s) will be supplied by VBA.
DB name = Envisage Table name = HD_Call Columns = DateRaised (datetime, null), DateCompleted (datetime, null)
Help in understanding how to construct this query will be grately appreciated.
I have a dimension called "Movement rate". The members are "1" to "6". There is a measure called "No. of Products".
What i easily like to do is showing the percentages "No. of Product" for each "Movement rate" of the amount of "No. of Products" without using the frontend-tool.
I have requirement in which i need to calculate percentage value based on billamount and concession amount..to calculate the percentage part and show the o/p.
SELECT PP.KID_ID_NO_V,(PP.FIRSTNAME_V + SPACE(1) + PP.LASTNAME_V)AS [PATIENT_NAME],BM.TOTAL_AMOUNT_M AS [BILL_AMOUNT],BM.CONCESSION_AMOUNT_M AS [CONCESSION_AMOUNT],BM.BILL_AMOUNT_M AS [TOTAL_AMOUNT], FROM BILL_MASTER BM INNER JOIN PATIENT_PROFILE PP ON BM.PATIENT_ID_N=PP.PATIENT_ID_N WHERE BM.BILL_SETTLED_C='Y'
I need to calculate percentage [COUNT(ALERT_RECEIVED_DATE) FRAUDCT,over SUM(CASE WHEN FRAUD_DECISION IS NULL THEN 1 ELSE 0 END) FRAUDUNWK] I tried my best but I cant come up with the solution.
Please, help.
Thk
SELECT CONVERT(nvarchar(10),dateadd(d,-day(ALERT_RECEIVED_DATE) + 1,ALERT_RECEIVED_DATE),101) PERIOD, COUNT(ALERT_RECEIVED_DATE) FRAUDCT, SUM(CASE WHEN FRAUD_DECISION IS NULL THEN 1 ELSE 0 END) FRAUDUNWK, SUM(CASE WHEN FRAUD_DECISION ='D' THEN 1 ELSE 0 END) DECLINED, SUM(CASE WHEN A.FRAUDID IS NOT NULL AND FRAUD_DECISION IS NULL THEN 1 ELSE 0 END) PENDING_EXCEPTION, SUM(CASE WHEN A.FRAUDID IS NOT NULL AND FRAUD_DECISION='D' THEN 1 ELSE 0 END) DECLINED_EXCEPTION FROM TBLFRAUDFINDER O
I need to calculate percentage [COUNT(ALERT_RECEIVED_DATE) FRAUDCT,over SUM(CASE WHEN FRAUD_DECISION IS NULL THEN 1 ELSE 0 END) FRAUDUNWK] I tried my best but I cant come up with the solution.
Please, help.
Thk
SELECT CONVERT(nvarchar(10),dateadd(d,-day(ALERT_RECEIVED_DATE) + 1,ALERT_RECEIVED_DATE),101) PERIOD, COUNT(ALERT_RECEIVED_DATE) FRAUDCT, SUM(CASE WHEN FRAUD_DECISION IS NULL THEN 1 ELSE 0 END) FRAUDUNWK, SUM(CASE WHEN FRAUD_DECISION ='D' THEN 1 ELSE 0 END) DECLINED, SUM(CASE WHEN A.FRAUDID IS NOT NULL AND FRAUD_DECISION IS NULL THEN 1 ELSE 0 END) PENDING_EXCEPTION, SUM(CASE WHEN A.FRAUDID IS NOT NULL AND FRAUD_DECISION='D' THEN 1 ELSE 0 END) DECLINED_EXCEPTION FROM TBLFRAUDFINDER O
I am relatively new to SQL i.e. I know the basics!
What I am trying to do is: I have a database of customer spend and I am trying to segment them into certain %ages of the search results. So, for example, find all of the customers that are in the top 10% of spenders (I also want to only select customers with a spend of greater than x!). I am trying to do this using a Case When but feel that I may be out of my depth.
Training_Module table data like this TRA_ID..TRA_NAME..TRA_GROUP -------------------------------------- v01SafetyVideo1G1 v02SafetyVideo2G1 v03SafetyVideo3G1 V04SafetyVideo4G2 V05SafetyVideo5G2 v06SafetyVideo6G2 v07SafetyVideo7G3 v08SafetyVideo8G3 v09SafetyVideo9G3
View_Training_Module table data like this EMP_ID.........TRA_ID....VIEW_DATE ------------------------------------------- p0006367V016/2/2007 p0006367V026/2/2007 p0006367V036/2/2007 p0003892V016/12/2007 p0003892V026/12/2007 p0003892V036/12/2007 p0003890V016/15/2007 p0003890V026/15/2007 p0003890V036/15/2007 p0001232V046/16/2007 p0001232V056/16/2007 p0001232V066/16/2007 p0001230V076/17/2007 p0001230V086/18/2007 p0001230V096/18/2007
We have 44 Safety training videos (15 minutes)
How can calculate the percentage of each employee in query ?
if emploee view 22 video it means that this employee 50% view the videos.
We have to calcuate 1. total number of video view by each employee, sum 2. each employee perentage of viewing.ie. percentage % 3. Group wise percentage, ? we have three group A,B,and C, calcuate the each group percentage in query ?
I'm trying to get the percentage of money raised compared to their goal. Basically 100*(SUM(Amount)/Goal). Here's my stored procedure:
CREATE PROCEDURE sproc_GetGoalPercentage ( @memberid int ) AS SELECT(SUM(D.Amount)/M.Goal)*100 FROMMembers AS M INNER JOIN Donors AS D ON M.ID = D.MemberID WHEREM.ID = @memberid GROUP BY M.Goal RETURN
I am trying to figure out the syntax for a query that will essentiallygive me the Percentage each of my areas contributes to the Whole. Iknow this can be achieved by multiple queries but I would like to keepit intact as one single query if possible.For Example I have the following data set--AREA MOUNE 1234SO 4312WE 12312MW 97123NE 1123SO 31WE 312MW 971The results I would like to see would look likeAREA MOU PERCENTMW 98094 .83536NE 2357 .02007WE 12624 .10751SO 4352 .03706The query I came up with is--SELECT DISTINCT Area, SUM(MOU) AS AREA_TOTAL, sum(MOU) /(SELECT SUM(MOU) AS TOTAL_MOUFROM [2004_NOVEMBER_COST])as[PERCENT]FROM [2004_NOVEMBER_COST]GROUP BY AreaAll seems to calculate with the exception of the Percent where all thepercentages are 0's.I think I need to take the first line AREA_TOTAL and now divide by theSUM(MOU) like this--SELECT DISTINCT Area, SUM(MOU) AS AREA_TOTAL, AREA_TOTAL /(SELECT SUM(MOU) AS TOTAL_MOUbut I get Invalid Column.I essence I think it is a simple query but I am hitting a wall. Anyadvice would help.Thanks,Ben
I want to add a percent column to the RIGHT of the total, and also on the bottom row. I can't find any clear examples of how to do this. If I had a new column, it adds additional headers beneath my top row. Or, my columns appear to the LEFT of the data, not the right. Can some please post some simple instructions that will make my simple matrix look like this:
Name Jan Feb Total %
John 5 6 11 60%
Mary 3 4 7 40%
Total 8 10 18 100%
% 40% 60% 100% 100%
I am so stuck on this I can pull my hair out.
Thanks!
Michael
p.s. I really hope the next version of SSRS has a simple "Sub-total %" option that you can enable just like the sub-total column.
What's incorrect with my sql so that the pct is not being calculated? I'm returning all zeros. ------------------------------------------------------------------------------------------------
SELECT
sa.schoolc sch#,
s.schname AS School,
Y = sum(CASE WHEN u.logindate IS NOT NULL THEN 1 END),
N = sum(CASE WHEN u.logindate IS NULL THEN 1 END),
pct = (sum(CASE WHEN u.logindate IS NOT NULL THEN 1 END)/
(sum(CASE WHEN u.logindate IS NOT NULL THEN 1 END)+sum(CASE WHEN u.logindate IS NULL THEN 1 END))) * 100
FROM
users AS u
INNER JOIN stugrp_active AS sa ON u.username = sa.suniq