MDX Syntax And Dimension Attribute In KPI

May 21, 2008

Hello SSAS gurus,

Recently i started learning working on Analysis services and writing MDX expressions, so please forgive my ignorance if this is a trivial question.
I ran out of s. Don't know what I should do to fix this. Please point me in the right direction.

We have a cube with one fact table(Imperative Fact) and two dimensions (Client, Client Imperative). A Client has several Imperatives. One of the attributes of Client Imperative dimension is Target Outcome. This is a text field.
We created a measure Client Imperative Count that gives the number of imperatives a client has.
The business defined 'Client Imperative' KPI as following :

If client has 1 or more imperatives and has Target outcome then show green. If client has 1 or more imperatives and does not haveTarget outcome then show yellow. if the client does not have imperative then show red.

Wrote the following KPI Status expression but it doesn't seem to work. Hitting a dead end. couldn't figure this out.






Code Snippet

Case
When
[Measures].[Client Imperatives Count] > 0
And
([Client Imperatives].[TRGT OTCM].currentmember <> null)
or
(Not IsEmpty([Client Imperatives].[TRGT OTCM].currentmember))
Then 1
When
[Measures].[Client Imperatives Count] > 0
And
([Client Imperatives].[TRGT OTCM].currentmember = null)
or
(IsEmpty([Client Imperatives].[TRGT OTCM].currentmember))
Then 0
Else
-1
End
Tried [Client Imperatives].[TRGT OTCM].value but didn't work.
Also, tried to create a calculated member for Target Outcome using following code. It is not working either.







Code Snippet

CALCULATE;
CREATE MEMBER CURRENTCUBE.[MEASURES].[Target Outcome]
AS case
when
[Client Imperatives].[TRGT OTCM].currentmember = [Client Imperatives].[TRGT OTCM].&[]
then 0
else 1
end,
VISIBLE = 1 ;
Trying to figure this out since two days. Somebody please help me.

I appreciate your help.

View 3 Replies


ADVERTISEMENT

Analysis :: How To Get Dimension Key Attribute In MDX

Apr 30, 2015

Many dimensions don't have unique members.  Instead, the dimension source data has duplicates at the leaf level: it's left up to SSAS to aggregate up to the actual leaf level used in hierarchies.

Every cube I've worked on in the past, a dimension is clearly defined in the source data, with uniqueness already present there: we don't make a dimension out of duplicated, sort of facty data.  This kind of design seems as weird to me as an unnormalised SQL database.

Here's an example to illustrate what I mean; I'll use that Adventureworks database.

We have a Geography dimension with a Geography hierarchy.  Levels go like this from top to bottom:

Country
State-Province
City
Postcode

The Geography dimension has a key attribute called Geography Key.  It's there in the cube design as a dimension attribute, but it's not in any of the hierarchies, so I can't query it in MDX.  But that's fine: it has the same cardinality as the lowest level (Postal Code), because the dimension has some kind of normal design.

In the cube I'm dealing with, it's all messed up.  Using the AdventureWorks example above as a parallel, someone made a Geography dimension with source data keyed on [PostalCode, ExactAddress], but only wanted the dimension granularity to be PostalCode.

This makes it very hard to debug why the data in this dimension is incorrect.  I can't match up the dimension members in the cube to the source data, because the dimension doesn't actually go down to the real leaf level!

So I have a dimension attribute called ExactAddressKey, but I can't query on it in MDX, because it's not part of any dimension hierarchy.  Unfortunately changing any part of this cube design is not possible, so I can't even experiment with settings and see what happens.

How I could get to the leaf level of the data imported?  Something like

Geography.Geography.TheInvisibleLeafLevel.Members.Properties('Key')

Or does this kind of dimension design result in SSAS discarding all the data that's more granular than the most granular attribute defined in any hierarchy - so that the data actually isn't there to be queried?

View 2 Replies View Related

Calculating From Measure And Dimension Attribute, Please Help !!!

Dec 19, 2005

Hello

I am a newbye with Analysis Services and am desperately trying to find a way to include a calculation between one of my measures (Teus), divided by the vessel capacity, where vessel is one of my dimensions (and is therefore not depended on other dimensions...)

Any ideas how I could implement that ?? This would help a lot, thanks for your help,

Aurore Bui.

View 2 Replies View Related

Formatting Attribute In Dimension Table

Apr 7, 2008

I have date and float in attribute in a dimension table. If deploy my cube and I try to create a report with RS, I can't format this data. The value seems to be a String so I have to do a CDate or a CDbl before formating it.
I have no problem when I try to format my measures.

Thanks for your help.
Cheers,

View 15 Replies View Related

Analysis :: Change Dimension Name Attribute?

Sep 8, 2015

I have 2 dimensions that pull their Facility Name from the same Location Dimension.  The business users want to change Facility Name in the Material Facilities dimension to “Material Facility Name”, but keep Facilities dimension attribute the same. What is a good way to go about completing this task.  

View 2 Replies View Related

Analysis :: Using Named Set To Filter On Dimension Attribute

Jun 4, 2015

I am unable to find solution for the problem while writing a Named Set in my cube.

I have a calculated measures which gives me difference in Sales in PERCENTAGE (%).

When I try to filter out those product codes which went a less than 5 %, I get no records.

I have also tried to filter direct values lets say - Products with sales > 100000 which is working fine.

Following is sample of my Named Set

FILTER([X].[Products Code].members, [Measures].[Diff in Sales]<5)

I believe as the values are in percentage, I am facing this issue.

View 21 Replies View Related

Calculated Member Based On Dimension Attribute ??

May 21, 2008

hi all,
I was wondering if it is possible in SSAS 2005 that a calculated member is based off of an (integer) dimension attribute and another (integer) measure (let's say a multiplication operation) ?

If there a trick on doing so? other than stuffing the (integer) dimension attribute back in the fact table, as an measure?

thx much,
Cos

View 6 Replies View Related

Dimensional Modeling: Age As A Slowly Changing Dimension Attribute?

Oct 8, 2007



Hi all

Probably not the right forum - pointers would be appreciated - but I'll give it a try anyway:

I'm in the process of designing a relational database to be used in a BI scenario - ie. dimension and fact tables. The data will eventually be used to feed cubes in Analysis services, however end users will probably be allowed to run reports aginst views of the relational database.

I'm currently looking at the employee dimensions and my first try would designate AGE as a SCD Type 2 attribute. As a result every employee gets at least one new record every year as AGE increases. Given that BIRTHDATE is specified should I drop AGE from the tables and recreate it as a computed attribute in database views and/or cubes?

Regards, Steen

View 7 Replies View Related

Analysis :: SSAS Displaying Latest Dimension Attribute

Jun 30, 2015

I have a cube with a fact table and 3 dimensions.  One of the dimensions is a type 2 and surrogate key is stored in fact table.  If i query the database, the dimension attributes display correctly, however the cube is always displaying the latest dimension attribute and not preserving the history.  

The measures are correct for the time period displayed, but the dimension attributes always show the latest values.

View 3 Replies View Related

MDX Query On Non-Visible Attribute Hierarchy Dimension Fields

Aug 8, 2007

I am in the process of develping a MSRS report using an MSAS 2005 OLAP cube as my data source. In the MSRS Query Builder, I am using an MDX query which successfully executes in Management Studio. Something like the following:


SELECT

NON EMPTY { [Measures].[Fact Count] }
ON COLUMNS,
NON EMPTY{ ( [Dim Attribute].[Hierarchy Not Visible].ALLMEMBERS) } DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME
ON ROWS
FROM [MyCube]

CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING, FONT_NAME, FONT_SIZE, FONT_FLAGS

The twist is that the AttributeHierarchyVisible property of the [Dim Attribute].[Hierarchy Not Visible] is set to False.

As mentioned previously, the query successfully executes in Management Studio. However when it is executed in the MSRS Query Builder, the following error message is displayed:

The query cannot be prepared: The query must have at least one axis. The first axis of the query should not have multiple hierarchies, nor should it reference any dimension other than the Measures dimension..
Parameter name: mdx (MDXQueryGenerator)


Is there a way to successfully query dimension attributes whose hierarchies are not visible?

Thanks.

View 2 Replies View Related

Analysis :: SSAS Named Set With A Two Dimension Attribute Tuple

Jul 15, 2015

In my SSAS Cube I have created a dynamic named set "top 10 e-learnings by language" which consists out of a set of tuples. Each tuple has two attributes out of the same base dimension "training": attribute 1 is "sprache" (language) and attribute 2 is "training text".

CREATE DYNAMIC SET CURRENTCUBE.[Top 10 eTrainings pro Sprache]
AS Generate(
{ [Training].[Sprache].[Sprache].Members },
TopCount(
EXISTING { [Training].[Sprache].CurrentMember * [Training].[Training Text].[Training Text].Members },
10,
[Measures].[Teilnahmen eTraining]
)
), DISPLAY_FOLDER = 'Training' ;

Normally a named set would be automatically visible in Excel Pivot under the dimension you used to create the named set, but it seems that named sets with tuples which have more than one attribute are placed in a separate folder "Sets" in between the measures and dimensions.Additionally in the SSAS cube browser this named set is not visible at all.Is there any way to tell the named set in which dimension it should appear or any workaround?

View 2 Replies View Related

Slowly Changing Dimension Historical Attribute Causeing Same Row To Be Reinserted

Sep 29, 2006

I have a Slowly changing dimension that I am using to
populate a dimension table. My problem is this when I run the package and
any of the fields are marked as Historical Attributes it will add an additional
row regardless of the fact that the incoming data and the data in the warehouse
match exactly.



I've tried several things to fix this problem but so far none of them have
worked. Some of the things I have tried that havent worked are to match
all the data types (which I have to do anyways) I've tried trimming the
strings, I've also tried adding just one column



I am using a data conversion to convert them from varchar (the source datatype)
to nvarchar(the warehouse datatype)



I'm at a dead end here and don't know where to go any help would be greatly appreciated.



Thanks

View 5 Replies View Related

Analysis :: Setup Multiple Default Members For A Dimension Attribute In SSAS?

Jun 2, 2015

I have a dimension report with an attribute reporttype which have different member let say A,B,C,D....etc.

I want to set more than one default members for dimension report.

I've read all about how dimensions can have only one default member, but I need to set more than 1.

View 2 Replies View Related

Analysis :: Data Masking For Dimension Attribute Based On User In SSAS 2014 Multidimensional?

Jun 15, 2015

I am trying to implement data masking based on user login and not sure why this is not working. I have the dimensions DimBrand, DimProduct and DimUser. I should mask the BrandCode with 'XXXX' nothing but in the report all the BrandCode should appear but few of the code will be masked if the user is not belongs to that group. I have a fact table FactProduct in this. In the cube I created all these 3 dimensions and the fact table. I created a new dimension DimBrandMask and I separated the code over there with a relationship with the actual DimBrand dimension. In the cube a reference relationship is set up with the measure group. Created a role with read access.

In the dimension data tab of role I put the below MDX to allowed set.

NonEmpty([DimBrandMask].[Brand Code].Members, (StrToMember("[DimUser].[Login Name].[Login Name].[" + UserName() + "]") ,[Measures].[Dim User Count]))

And in Denied Member set i put the below MDX

IIF( (StrToMember("[DimUser].[Login Name].[Login Name].[" + UserName() + "]"), [DimUser].[Access Right].&[False]), NONEMPTY( [DimBrandMask].[Brand Code].Members,(StrToMember("[DimUser].[Login Name].[Login Name].["
+ UserName() + "]"), [DimUser].[Access Right].&[False], [Measures].[Dim User Count])),{})

Note I created one measure group from the DimUser table and the measure [Dim User Count] is used in the above query.

I am expecting some result like below

Brand      BrandCode           Count
Brand1      b1                       6
Brand2     XXXXX                  5
Brand3     XXXXX                 10

View 9 Replies View Related

How To Use DIMENSION PROPERTIES Syntax In MDX For A Dataset

Dec 20, 2007



Hi,

I tried to retreive dimension member properties using DIMENSION PROPERTIES syntax in a dataset for a report, is this possible?

What is the correct syntax? a working example will be appreciated since I could not make it work somehow .

Thanks for your attention.

Yongli

View 3 Replies View Related

Analysis :: Add Dimension To Cube Dimension Without Any Relation In Dimension Usage

Oct 26, 2015

When i add a dimension to the cube dimension without any relation in my dimension usage to any measure group my units are going down.However when i remove the dimension from the cube am getting the correct values.

View 4 Replies View Related

SQL Server 2014 :: How To Check Existing Attribute In Insert Attribute In XML Field

Aug 10, 2015

I want to insert attibute att1 in field F1 . Value for this attribute is content of another field in this table (F2).

My query :
update MyTable
set F1.modify
('insert attribute att1 {sql:column("F2")} into (/ROOT/Node1)[1]')
Where F1 Is not null

But I get this error :
XML well-formedness check: Duplicate attribute 'att1'. Rewrite your XQuery so it returns well-formed XML.

How do I check the douplicate attribute ?

View 0 Replies View Related

Measure Group Attribute Key Column Does Not Match Source Attribute

May 16, 2008



HI,


I had to change the key columns of a dimension attribute to fix an error. I did this in BIDS. The change was from a single key column to a composite key column. Now I am getting these error when I process the cube:

Measure group attribute key column x does not match source attribute ..

I looked at the cube XMLA definition under mesaure groups and it still shows a single key column with inherited binding. However, the BIDS does not give me an option correct this in any way. I have had to do this once before and the only option seems to be removing the dimension from the cube and add it back in. But that is very error prone since I lose any specific settings at the cube dimension level not to mention aggregations no longer include the dimension, etc.

Not seeing an alternative, I went through each measure group (I have 7) and changed the key columns manually in the XMLA and saved the cube. This worked, but I don't understand why BIDS automatically doesn't do it.

Is this a flaw in the BIDS or I should be missing something.

thanks
MJ

View 3 Replies View Related

Filtering Out 1 Time Dimension Based On The Selection In Another Time Dimension

May 19, 2008

Hi!

Need some help building a query that does the following :

I have 2 Time Dimensions ; Time (Transdate) and ClosedDate (ClosedDate)

In my report/query, if [Time].CurrentMember = [Time].[YMD].[YMD].[2006].[200610].[20061031] I want to FILTER out all ClosedDate < [ClosedDate].[YMD].[YMD].[2006].[200610].[20061031]

Both Time Dimensions are Year -> Month -> Day and have the same Members.

I have every option available, using calculated Members and/or Measures to do this.

The report I'm creating is Aging of Receivables : Balance / 30 days / 60 days / etc.. But for the Aging, I need to filter like explained above.

Appreciate all help!

Regards,
Stian Bakke

View 3 Replies View Related

Incorrect Syntax Near The Keyword CONVERT When The Syntax Is Correct - Why?

May 20, 2008

Why does the following call to a stored procedure get me this error:


Msg 156, Level 15, State 1, Line 1

Incorrect syntax near the keyword 'CONVERT'.




Code Snippet

EXECUTE OpenInvoiceItemSP_RAM CONVERT(DATETIME,'01-01-2008'), CONVERT(DATETIME,'04/30/2008') , 1,'81350'




The stored procedure accepts two datetime parameters, followed by an INT and a varchar(10) in that order.

I can't find anything wrong in the syntax for CONVERT or any nearby items.


Help me please. Thank you.

View 7 Replies View Related

Incorrect Syntax When There Appears To Be No Syntax Errors.

Dec 14, 2003

I keep receiving the following error whenever I try and call this function to update my database.

The code was working before, all I added was an extra field to update.

Exception Details: System.Data.SqlClient.SqlException: Incorrect syntax near the keyword 'WHERE'


Public Sub MasterList_Update(sender As Object, e As DataListCommandEventArgs)

Dim strProjectName, txtProjectDescription, intProjectID, strProjectState as String
Dim intEstDuration, dtmCreationDate, strCreatedBy, strProjectLead, dtmEstCompletionDate as String

strProjectName = CType(e.Item.FindControl("txtProjectName"), TextBox).Text
txtProjectDescription = CType(e.Item.FindControl("txtProjDesc"), TextBox).Text
strProjectState = CType(e.Item.FindControl("txtStatus"), TextBox).Text
intEstDuration = CType(e.Item.FindControl("txtDuration"), TextBox).Text
dtmCreationDate = CType(e.Item.FindControl("txtCreation"),TextBox).Text
strCreatedBy = CType(e.Item.FindControl("txtCreatedBy"),TextBox).Text
strProjectLead = CType(e.Item.FindControl("txtLead"),TextBox).Text
dtmEstCompletionDate = CType(e.Item.FindControl("txtComDate"),TextBox).Text
intProjectID = CType(e.Item.FindControl("lblProjectID"), Label).Text

Dim strSQL As String
strSQL = "Update tblProject " _
& "Set strProjectName = @strProjectName, " _
& "txtProjectDescription = @txtProjectDescription, " _
& "strProjectState = @strProjectState, " _
& "intEstDuration = @intEstDuration, " _
& "dtmCreationDate = @dtmCreationDate, " _
& "strCreatedBy = @strCreatedBy, " _
& "strProjectLead = @strProjectLead, " _
& "dtmEstCompletionDate = @dtmEstCompletionDate, " _
& "WHERE intProjectID = @intProjectID"

Dim myConnection As New SqlConnection(System.Configuration.ConfigurationSettings.AppSettings("connectionstring"))
Dim cmdSQL As New SqlCommand(strSQL, myConnection)

cmdSQL.Parameters.Add(new SqlParameter("@strProjectName", SqlDbType.NVarChar, 40))
cmdSQL.Parameters("@strProjectName").Value = strProjectName
cmdSQL.Parameters.Add(new SqlParameter("@txtProjectDescription", SqlDbType.NVarChar, 30))
cmdSQL.Parameters("@txtProjectDescription").Value = txtProjectDescription
cmdSQL.Parameters.Add(new SqlParameter("@strProjectState", SqlDbType.NVarChar, 30))
cmdSQL.Parameters("@strProjectState").Value = strProjectState
cmdSQL.Parameters.Add(new SqlParameter("@intEstDuration", SqlDbType.NVarChar, 60))
cmdSQL.Parameters("@intEstDuration").Value = intEstDuration
cmdSQL.Parameters.Add(new SqlParameter("@dtmCreationDate", SqlDbType.NVarChar, 15))
cmdSQL.Parameters("@dtmCreationDate").Value = dtmCreationDate
cmdSQL.Parameters.Add(new SqlParameter("@strCreatedBy", SqlDbType.NVarChar, 10))
cmdSQL.Parameters("@strCreatedBy").Value = strCreatedBy
cmdSQL.Parameters.Add(new SqlParameter("@strProjectLead", SqlDbType.NVarChar, 15))
cmdSQL.Parameters("@strProjectLead").Value = strProjectLead
cmdSQL.Parameters.Add(new SqlParameter("@dtmEstCompletionDate", SqlDbType.NVarChar, 24))
cmdSQL.Parameters("@dtmEstCompletionDate").Value = dtmEstCompletionDate
cmdSQL.Parameters.Add(new SqlParameter("@intProjectID", SqlDbType.NChar, 5))
cmdSQL.Parameters("@intProjectID").Value = intProjectID

myConnection.Open()
cmdSQL.ExecuteNonQuery
myConnection.Close()

MasterList.EditItemIndex = -1
BindMasterList()


End Sub

Thankyou in advance.

View 3 Replies View Related

Which Is Faster? Conditional Within JOIN Syntax Or WHERE Syntax?

Mar 31, 2008

Forgive the noob question, but i'm still learning SQL everyday and was wondering which of the following is faster? I'm just gonna post parts of the SELECT statement that i've made changes to:

INNER JOIN Facilities f ON e.Facility = f.FacilityID AND f.Name = @FacilityName

OR

WHERE f.Name = @FacilityName


My question is whether or not the query runs faster if i put the condition within the JOIN line as opposed to putting in the WHERE line? Both ways seems to return the same results but the time difference between methods is staggering? Putting the condition within the JOIN line makes the query run about 3 times faster?

Again, forgive my lack of understanding, but could someone agree or disagree and give me the cliff-notes version of why or why not?

Thanks!

View 4 Replies View Related

Converting Rrom Access Syntax To Sql Syntax

Sep 23, 2007


Ok I am tying to convert access syntax to Sql syntax to put it in a stored procedure or view..
Here is the part that I need to convert:

SELECT [2007_hours].proj_name, [2007_hours].task_name, [2007_hours].Employee,
IIf(Mid([task_name],1,3)='PTO','PTO_Holiday',
IIf(Mid([task_name],1,7)='Holiday','PTO_Holiday',
IIf(Mid([proj_name],1,9) In ('9900-2831','9900-2788'),'II Internal',
IIf(Mid([proj_name],1,9)='9900-2787','Sales',
IIf(Mid([proj_name],1,9)='9910-2799','Sales',
IIf(Mid([proj_name],1,9)='9920-2791','Sales',

)
)
)
)
) AS timeType, Sum([2007_hours].Hours) AS SumOfHours
from................

how can you convert it to sql syntax

I need to have a nested If statment which I can't do in sql (in sql I have to have select and from Together for example ( I can't do this in sql):
select ID, FName, LName
if(SUBSTRING(FirstName, 1, 4)= 'Mike')
Begin
Replace(FirstNam,'Mike','MikeTest')
if(SUBSTRING(LastName, 1, 4)= 'Kong')
Begin
Replace(LastNam,'Kong,'KongTest')
if(SUBSTRING(Address, 1, 4)= '1245')
Begin
.........
End
End

end




Case Statement might be the solution but i could not do it.






Your input will be appreciated

Thank you

View 5 Replies View Related

NOCASE Attribute

Jun 25, 2004

Does someone could explain me the NOCASE attribute in the order by line?

I cant find that anywhere.

Thanks a lot,
venusgirrl

View 4 Replies View Related

Attribute Key Cannot Be Found !

Jun 3, 2007

Hello !

Can somebody help me with the following error while deploying my cube:

The attribute key cannot be found : dbo_fact_table, Column: datetime Value 25/10/1901 4:18:00 pm...

The year 1901 is included in the time period of the time dimension.
The calendar includes the following dates :
1/1/1753 - 31/12/2007 (Time binding)
Why this referential integrity error occurs ??

Please help me because it is urgent and I cannot find a solution..

Thanks

View 1 Replies View Related

Nullable Attribute

Sep 10, 2007

What happens if a column which has been defined so that it should not be Nullable is passed a value which is null?

i.e. IDNumber - Primary Key and Nullable = No.

Thanks

View 3 Replies View Related

DropDownList Attribute ????

Dec 11, 2007

can someone please tell me if you can implement a drop down list within a table attribute.

If anyone could show me an example please do.


Kind Regards

Rob

View 11 Replies View Related

MAC Address Attribute

Aug 10, 2005

Hi:I need to store MAC Addresses. What is the standard way of storing thistype of attribute? Datatype? I can't find any discussions about thisanywhere.Thx for any pointers.

View 1 Replies View Related

Selecting N-th Attribute

Jul 20, 2005

Hi!I have a following problem: I need to select some attributes fromtable, i.e.first, third, fifth...Can anyone give me the hint how to do it. Is there some method to saysomthing like this:SELECT $1, $3, $5 which will refer to the 1st, 3rd and 5th attribute?Thanks!Mario.

View 5 Replies View Related

Using T-SQL REPLACE (or XML) To Add An Attribute To Every Other &&<td&&> Tag

Jan 10, 2008

I have the following as part of a stored procedure that generates an HTML report based on the data inserted into the table variable "@tblTemp":


SET @html =

N'<table border="1" width="0" style="font-family: Verdana, sans-serif;">' +

N'<tr><th>Name></th><th>ID</th></tr>' +

N'<col align="left"></col><col align="right"></col>' +

CAST ( ( SELECT td = [Name], '',

td = IDNumber

FROM @tblTemp

ORDER BY ID

FOR XML PATH('tr'), TYPE

) AS NVARCHAR(MAX) ) +

N'</table>' ;

SET @html = @html + N'<br /><br /><img src="muuscreenshot.jpg" width="452" height="507" alt="sample.aspx" />'

This generates a 2 column table that later in the stored procedure is sent out via sp_send_dbmail. The problem I'm having is that I want the right (2nd) column of the table to be right-aligned. For some reason, the line "

N'<col align="left"></col><col align="right"></col>' +" doesn't right-align the 2nd column when the report is sent through email (althought it does work if I take the generated string a use it to manually create an HTML file). So I want to add something like:

SET @html = REPLACE(@html, '<td', '<td align="right"')


but I still want the left column to be left-aligned, and this right-aligns everything. Is it possible for me to use REPLACE (or some other string function) to replace every other (alternating) "<td", or should I be looking at parsing this string using some 2005 XML features (unfortunately, using a CLR function to do this is not an option, since I am not allowed to turn that on on the server I'm using)? Thanks in advance.

-Dave

View 7 Replies View Related

Forced_Regressor Attribute

Jan 9, 2008



I am trying to create a linear regression model. The model is skipping lot of columns for regression. But I want model to use all the columns even if they are not valid. I use Forced_Regressor attribute while creating the model.

add mining model Regressiontableinput2_Model
(

[id] ,

[Reading] PREDICT_ONLY,

[Const] regressor,

[HCDD] regressor,

[HHDD] regressor,

[Hr1] regressor,

[Hr2] regressor,

[Hr3] regressor,
) USING MICROSOFT_LINEAR_REGRESSION (FORCED_REGRESSOR=1)



I get the error

Error (Data mining): The 'FORCED_REGRESSOR' data mining parameter is not valid for the 'Regressiontableinput2_Model' model.

Can somedbody tell me what is the syntax for using FORCED_REGRESSOR

Thanks,
DMNovice

View 4 Replies View Related

SQL XML :: Access Attribute Value

Jun 30, 2015

I am trying to generate an output using Productname from below xml which will look like:

B/C/
B/D/E
demo xml:
DECLARE @myDoc xml
DECLARE @ProdID nvarchar(10)
SET @myDoc = '<Root>
<ProductDescription Productname="A" Productd="Road Bike">

[code]...

I have a query which works perfect but  with nodes. similar way I am looking for the value column. I want a similar result from the function on "Value" column(value column is defined inside the below query) : B/D/E ....

with
CTE_xpath as (
select
T.C.value('local-name(.)', 'nvarchar(max)') as Name,
T.C.query('./*') as elements,
T.C.value('text()[1]', 'nvarchar(max)') as Value

[code]...

View 13 Replies View Related

Derived Attribute

Oct 11, 2007



i have a column in my table that will store the sum of 3 other column, e.g the data in total_book column will be equal to the sum of the number in the romance, fiction and thriller column. how do i do this?

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved