Derive Columns From Cube Member?

Aug 29, 2007

I have a cube that I read in a data flow section using OLE DB. To get this to work I had to do an ad hoc query through a sql server database ( this is problem that is described in post 219068).
So I now have the data and I want to derive new columns based on that data using an if statement:

if ( ISNULL(" [Facility].[REGION].[NATCODE].[MEMBER_CAPTION] " ) comptype = "NAT" else comptype = "REG"
comptype is the new derived column I am creating.

But when I try to save this I get an error: The expression might contain an invalid token, an incomplete token, or an invalid element. It might not be well-formed, or might be missing part of a requred element such as parenthesis

I selected the cube element from the columns list in derived element, when it initially put it in it looked like:

[[Facility].[REGION].[NATCODE].[MEMBER_CAPTION] ]
and gave error:

The token "[" was not recognized. The expression cannot be parsed because it contains invalid elements at the location specified.

Below is the statement I use to get data back from AS
select * from openrowset('MSOLAP', 'DATASOURCE=local; Initial Catalog=Patient Demographics 2005;',
'with member [Measures].[TimeDisplayName] as [Calendar].CurrentMember.Name
SELECT NON EMPTY { [Measures].[TimeDisplayName],[Measures].[Case Count],
[Measures].[A100 Bathing],[Measures].[A100 Bed Chair Wheelchair],
[Measures].[A100 Bladder],[Measures].[A100 Bowel],
[Measures].[A100 Dressing Lower],[Measures].[A100 Dressing Upper],
[Measures].[A100 Eating],[Measures].[A100 Grooming],
[Measures].[A100 Stairs],[Measures].[A100 Toilet],
[Measures].[A100 Toileting],[Measures].[A100 Tub Shower],
[Measures].[A100 Walk Wheelchair],[Measures].[A200 Comprehension],
[Measures].[A200 Expression],[Measures].[A200 Interaction],
[Measures].[A200 Memory],[Measures].[A200 Problem Solving],
[Measures].[D100 Bathing],[Measures].[D100 Bed Chair Wheelchair],
[Measures].[D100 Bladder],[Measures].[D100 Bowel],
[Measures].[D100 Dressing Lower],[Measures].[D100 Dressing Upper],
[Measures].[D100 Eating],[Measures].[D100 Grooming],
[Measures].[D100 Stairs],[Measures].[D100 Toilet],
[Measures].[D100 Toileting],[Measures].[D100 Tub Shower],
[Measures].[D100 Walk Wheelchair],[Measures].[D200 Comprehension],
[Measures].[D200 Expression],[Measures].[D200 Interaction],
[Measures].[D200 Memory],[Measures].[D200 Problem Solving] } ON COLUMNS,
({[Facility].[REGION].[NATCODE], [Facility].[REGION].[REGCODE]} *
[RIC].[CMGGRPCD].ALLMEMBERS ) ON ROWS FROM [CMG Demographics]
WHERE [Calendar].[Quarter 2 (2007)]')

So can some one help me on how I can do this derived colum.

View 7 Replies


ADVERTISEMENT

Power Pivot :: Aggregating Time Periods In Cube-member / Cube-value Formulas?

Aug 23, 2015

I am just starting out using CUBEMEMBER/CUBEVALUE formulas in excel linked into a sql olap db - using this method for some custom reports where pivot tables are not suitable.
The time dimension values include Months, Quarters and Years and the CUBEMEMBER formulas like

=CUBEMEMBER("OLAPCUBE","[Time].[Time].[Year].&[2015].&[1].&[1]") work fine - 1st quarter 1st month etc.

Is there a straightforward notation to aggregate months or do I need to use a plus sign to add a number of CUBEMEMBER formulas together.In other words - Is there an easier way of for say jan to july 2015 totals than

=CUBEMEMBER("OLAPCUBE","[Time].[Time].[Year].&[2015].&[1]") + (CUBEMEMBER("OLAPCUBE","[Time].[Time].[Year].&[2015].&[2]")) + (CUBEMEMBER("OLAPCUBE","[Time].[Time].[Year].&[2015].&[3].&[7]"))

I haven't tested this but have assumed it works but a bit long and clumsy.

View 5 Replies View Related

A New Member Could Not Be Added To A Local Group Because The Member Has The Wrong Account Type

Mar 23, 2007

Hi all,

I installed SQL 2005 SP2 + ReportServices Add-in for Sharepoint (WSS 3.0). All it's OK until I try to grant database access in the Sharepoint Central Admin site.

I setup the Reporting Services Integration (Manage integration settings). I use the default SQL instance, I put the USERNAME and the PASSWORD of my ADMIN account in the ENTER CREDENTIALS windows.. When I click the "OK" button, I receive always the error ...

"A new member could not be added to a local group because the member has the wrong account type"

I tried a lot of things... without success.

Is there someone who can help me....

PS: There is no error in the LOG



Thanks

View 18 Replies View Related

A New Member Could Not Be Added To A Local Group Because The Member Has The Wrong Account Type

Mar 23, 2007

Hi all,

I installed SQL 2005 SP2 + ReportServices Add-in for Sharepoint (WSS 3.0). All it's OK until I try to grant database access in the Sharepoint Central Admin site.

I setup the Reporting Services Integration (Manage integration settings). I use the default SQL instance, I put the USERNAME and the PASSWORD of my ADMIN account in the ENTER CREDENTIALS windows.. When I click the "OK" button, I receive always the error ...

"A new member could not be added to a local group because the member has the wrong account type"

I tried a lot of things... without success.

Is there someone who can help me....

PS: There is no error in the LOG



Thanks

View 4 Replies View Related

Master Data Services :: How To Add A Reference To Another Entity Member When Creating A Member

Oct 23, 2014

I need to create a member that one of its Attributes (maybe my term is wrong) is a reference to another entity member named group 
the code 

createRequest.Members.MemberType = MemberType.Leaf;
createRequest.Members.Members = new System.Collections.ObjectModel.Collection<Member> { };
Member aNewMember = new Member();
aNewMember.MemberId = new MemberIdentifier() { Name = uag.groupName, MemberType = MemberType.Leaf };

[code]....

 "The attribute data type is not valid".Is it wrong to add the reference as attribute? How can I embed the reference in the new member? 

View 4 Replies View Related

SQL 2012 :: Delete Rows If Member Does Not Exists In The Member Table

Sep 24, 2015

I have a table where I need to delete rows if the member does not exists in the member table. Will the following syntax work ?

Delete T
FROM Event_Temp_Lead_Screen T
left join member M on ( M.MemberID = T.MemberID )
where
T.Gender is NULL

View 9 Replies View Related

T-SQL Derive Column From Bit Field.

Aug 11, 2004

Hi

I'm sure this is simple T-SQL but I'm stuck.

I've a bit field named "Active" and a varchar [Name] field
I want to select a derived fields "DisplayName" that consists of the Name plus either "Active" or "Not Active" depending if Active is 1 or 0.
Something like SELECT [Name]+(IF Active THEN ' Active' ELSE ' Not Active') AS DisplayName FROM Lookups ORDER BY DisplayNamebut that doesn't work.
Any suggestions please?

View 1 Replies View Related

How To Derive String To Datetime

Jul 15, 2015

How to derived string to datetime (dd/mm/yyyy)

Input Date : Start Date 

15/06/2015 30/06/2015

NULL 2015/06/24

Some date are in format dd/mm/yyyy I want to keep them as it is , but I want to convert the NULL one and 2015/06/24 to 24/06/2015. How can I do this .

I tried this :

select distinct CONVERT(VARCHAR(100),[Start Date],103) from it_projects_src

 but doesnt work with "2015/06/24"

View 10 Replies View Related

Derive Attendance Data From CLOCK IN And OUT

Jan 28, 2014

I am trying to develop an attendance application which calculates the shift details as per the Clock IN OUT Data , the following are the table details

CREATE TABLE [dbo].[INOUTData](
EmpID VARCHAR(10),
CLockDate Date NULL,
[INTIME] Time NULL,
[OUTTIME] Time NULL,
) ON [PRIMARY]

[Code] ....

-- I am trying to get the data as follows combining these two tables

EMpID ClockDateSession1StartTimeSession1EndTimeActualSession1StartTimeActualSession1EndTime
Session2StartTimeSession2EndTimeActualSession2StartTimeActualSession2EndTime
E1 28-Jan-201408:00:0012:00:0007:50:0012:15:0017:00:0021:00:0017:15:00 20:55:00
E2 28-Jan-201408:00:0012:00:0008:30:00NULL17:00:0021:00:0016:15:0021:55:00
E3 28-Jan-201408:00:0012:00:00NULL 11:34:0017:00:0021:00:0016:15:00 21:55:00
E4 28-Jan-201408:00:0012:00:0008:30:00 11:34:0017:00:0021:00:00NULL 21:55:00
E5 28-Jan-201410:00:0014:00:0010:35:0014:44:0019:00:0023:00:0018:55:00 NULL

Right now i am using a stored procedure which traverses through each record and does the job.

Is there any way to do it with Pivot, or queries instead of cursors.

View 2 Replies View Related

How Does MS ReportingServices Derive Oracle Paramters

Apr 28, 2008

We are using MS Reporting Services to generate Xmls for corporate billing statements. Our DBAs found that MS ReportingServices are querying Oracle Catalogue before executing stored procedures in RDLs to get Oracle parameter information. Is there a way to eliminate the trip to database before executing the stored procedures?


Hongmei

View 1 Replies View Related

How To Derive Parameters In Ad Hoc SELECT Statements

Jul 7, 2007

Hi,

If I have ad hoc SQL statements created by users, which could be parameterized, how could I derive the parmeters at runtime. I cannot use CommandBuilder.DeriveParameters() as that is for StoredProcedures only.



Just use Split on the SQL string? Or is there a better way, such as a third-party .Net Component?



Thanks

John

View 5 Replies View Related

Derive Base Table/column From View

Aug 19, 2002

Is there any way to get the base table/column from a view by supplying the view name/column name_in_view? I know about INFORMATION_SCHEMA.VIEW_COLUMN_USAGE, but it doesn't always work. Try it on a regular database, not pubs. Any help is appreciated!

View 1 Replies View Related

Assign An Output Of Derive Column To Variable

Sep 11, 2007

I have a derive column( sequence) transformation in data flow , i am trying to assign this column to a variable , so that i can use it in the SQLtask control flow... how can i do this? can you show me some examples?

View 10 Replies View Related

Analysis :: Dynamic KPI Goal - Derive From Source Database

Jul 14, 2015

I have a requirement to make all of my KPI goals configurable by the end user - I would like to add the data to my datawarehouse so that it is updated in the cube whenever the cube is processed. I'm thinking I will need a table for each KPI that includes two columns (I will be setting goal by year):

Year
Value

In my cube I then create a measure group for each KPI (for some I will add a calculations to break down the yearly goal to lower levels of detail).I will add each measure to my Dimension Usage and relate to each of my time dimensions at the Year level.I currently have around a dozen KPIs - my above approach seems a bit messy i.e. requiring a table and measure group for each KPI (I guess I could at least put them all into one table in my relational db). 

View 2 Replies View Related

Integration Services :: How To Derive String To Date-time

Jul 15, 2015

How to derived string to date-time (dd/mm/yyyy)

Input Date :

Start Date 
15/06/2015
30/06/2015
NULL
2015/06/24

Some date are in format dd/mm/yyyy I want to keep them as it is , but I want to convert the NULL one and 2015/06/24 to 24/06/2015.

View 3 Replies View Related

Analysis :: Creating Cube With AMO - Cube Has No Measure Groups?

May 19, 2015

I have problems creating a cube with AMO.

I can add the cube to the database object and fill it with dimensions and a measuregroup (see code below).

If I call cube.Update() it says something like "Error in meta data manager. Cube has no measuregroups." (getting the message in german language)

The error in Microsoft.AnalysisServices.OperationException.Results.Messages is -1055653629

I can't find any documentation about this (or any other) error code in Microsoft documentation.

Here's my Code:

Cube newCube = database.Cubes.Add("MyCube","MyCube");
newCube.Language = 1031;
newCube.Collation = "Latin1_General_CI_AS";
CubeDimension dim = newCube.Dimensions.Add("dim1","dim1","dim1");
CubeAttribute attrib = dim.Attributes.Find("dim1Attr1");

[code]....

View 2 Replies View Related

GetSchemaDataset For Cube Restriction With Space In The Cube Name

May 27, 2008

When I make a call to GetSchemaDataset with a restriction of a cube name with a space in the name of the cube the call fails. Following is a sample of the code: adoRestriction = new AdomdRestriction("CATALOG_NAME", "Contoso Telecom_Contoso"); adoRestrictions.Add(adoRestriction); dataSet = conn.GetSchemaDataSet("MDSCHEMA_CUBES", adoRestrictions); I am running SQL Server 2005 Analysis Services SP2. Is there some way to qualify the cube name in the restriction or is this just a bug? Thanks.

View 1 Replies View Related

Derive A Column Based On Other Derived Column In A Table .. Is It Possible ?

Mar 25, 2008


Table structure as follows



Employee

Empno empname salary
commission



I want to have an other employee table named employee_modified

Empno empname salary
commission derived_column1(salary+commission)
derived_column2(derived_column1 + xxxx) and so on derive other
columns based on the earlier derived columns)

Is that possible to do it.. or am I doing something wrong.



something like



Select empno , empname , salary , commission,

(salary + commission) as derived_colum1 ,

(derived_colum1 + xxxxx) as derived_colum2 ,

(derived_colum2 + xxxxx) as derived_colum3

into employee_modified from employee

View 3 Replies View Related

RS2k Issue: PDF Exporting Report With Hidden Columns, Stretches Visible Columns And Misplaces Columns On Spanned Page

Dec 13, 2007

Hello:

I am running into an issue with RS2k PDF export.

Case: Exporting Report to PDF/Printing/TIFF
Report: Contains 1 table with 19 Columns. 1 column is static, the other 18 are visible at the users descretion. Report when printed/exported to pdf spans 2 pages naturally, 16 on the first page, 3 on the second, and the column widths have been adjusted to provide a perfect page span .

User A elects to hide two of the columns, and show the rest. The report complies and the viewable version is perfect, the excel export is perfect.. the PDF export on the first page causes every fith column, starting with the last column that was hidden to be expanded to take up additional width. On the spanned page, it renders the first column on that page correctly, then there is a white space gap equal to the width of the hidden columns and then the rest of the cells show with the last column expanded to take up the same width that the original 2 columns were going to take up, plus its width.

We have tried several different settings to see if it helps this issue or makes it worse. So far cangrow/canshrink/keep together have made no impact. It is not possible to increase the page size due to limited page size selection availablility for the client. There are far too many combinations of what the user can elect to show or hide to put together different tables to show and hide on the same report to remove this effect.

Any help or suggestion on this issue would be appreciated

View 1 Replies View Related

MDX - With Member

Apr 15, 2004

for example

with member [Measures].[Accumulated Sales] as 'Sum(YTD(),[Measures].[Store Sales])'
select
{[Measures].[Store Sales],[Measures].[Accumulated Sales]} on columns,
{Descendants([Time].[1997],[Time].[Month])} on rows
from Sales



I need more then 1 member how to do in


Thanks

View 4 Replies View Related

Hi From A New Member

May 8, 2008

Hi. I am Rabbee from Bangladesh who has join recently with the team. I need a Solution. How can I find out Duplicate data in sql server 200 database by generating a query. Thank you.

fazle rabbee

View 4 Replies View Related

SQL Member Rank

May 13, 2008

ive created a photo sharing site, and im trying to show the statisics for certain users, so far i can COUNT all the photos the user has upload, and show them in descending order, but i need to be able to see the ranking of the user, like :

RANK USERID No. Of Photos

1 10 100
2 8 70
3 9 85


is there anyway of doing this? thanks Si!

View 7 Replies View Related

Getting The Last Member Of As400

Mar 14, 2004

Hi,

I need some help here. I am trying to do a DTS from As400 from SQL Server 2000. However, the file that I require have members. IF I just do a select statement, it will retrieve the earliest member.


Does anyone know how I can access the latest member?

Thanks a lot!

View 3 Replies View Related

How To Hide A Member?

Jan 14, 2005

I have a dimension named Products with the following hierarchy:

Type
Sub Type
Product

Due to requirements I want that a particular product, whose name is, say, "XYZ" should not be displayed when the user drills down to the lowest level i.e. the Product level.

I tried playing with the Advanced Properties tab but could not make any progress and thus will be grateful for help.

Thanks.

View 1 Replies View Related

Calculated Member

Jan 19, 2005

Hello,

I have following problem:

A measure in a cube need to be divided by another measure as follows:

MEASURE1MEASURE2

Measure 1 (SUM of Money spent by each person)
Measure 2 (Amount of Money available for each country per person).
Example:
USA: 155
Germany:134
France:143)

Measure1 is a SUM and works fine, but Measure2 should only be a distinct value for each country. So if person comes from Germany, then the SUM of Spent Money should be divided by 134.

Any idea how this can be done.

View 1 Replies View Related

AS400 To SQL With Different MEMBER Name

Apr 7, 2007

I have been trying to transfer some data from a file located in a AS400 Server to SQL , but the file has more than one Member Name. I'm not sure how to specify a different member name on the SQL query . Please help.



The name of the file is:

Library = MTGLIBP2

File Name = CHSAVQPL

Member Name = INS



this is the query I have so far but I still need to reference the Member Name



SELECT *
FROM OPENQUERY(AS400PL,'SELECT * FROM mtglibp2.CHSAVQPL')






















I have been trying to transfer some data from a file located in a AS400 Server to SQL , but the file has more than one Member Name. I'm not sure how to specify a different member name on the SQL query . Please help.



The name of the file is:

Library = MTGLIBP2

File Name = CHSAVQPL

Member Name = INS



this is the query I have so far but I still need to reference the Member Name



SELECT *
FROM OPENQUERY(AS400PL,'SELECT * FROM mtglibp2.CHSAVQPL')

View 1 Replies View Related

AS400 Member

Aug 7, 2006

I need to query data through SSIS from what I was told is an AS400 DB2 member table. I am assuming this is a sub-table of the main table. I was going to write a correlated sub-query in SQL to get this data, however our AS400 contracted programmer says that there is an easier way and she pointed me to the main table's member. I do not know how to go about accessing this.

Has anybody had experience with this? The AS400 programmer is familiar with SQL syntax, however she does not know how to have SQL grab the data from a member table.

If all else fails, I will just construct my correlated sub-query.

Thanks for the information.

View 5 Replies View Related

MDX Ratio And All Member

May 21, 2008

Hello,

I have a calculated member that is a ratio calculation. It works fine but I would like that the value for the "All" member to be the sum of the children.

So I have the following MDX where the calculated member [Dim Group Rubric].[Group Rubric Description].[BO + ADM Cost] does not give me good results for the "All" member:


WITH

MEMBER [TOTAL YEAR CONTRACT] AS sum({[Total Year]},[Dim Contract].[Contract Number].[563131])

MEMBER [TOTAL YEAR BU] AS sum ([Total Year])

MEMBER [Dim Group Rubric].[Group Rubric Description].[TOTAL BU PVN] as

([Dim Group Rubric].[Group Rubric Description].[PVN], [TOTAL YEAR BU])

MEMBER [Dim Group Rubric].[Group Rubric Description].[TOTAL BU BO + ADM] as

([Dim Group Rubric].[Group Rubric Description].[BO + ADM], [TOTAL YEAR BU])

MEMBER [Dim Group Rubric].[Group Rubric Description].[BO + ADM Cost] as

([Dim Group Rubric].[Group Rubric Description].[PVN], [TOTAL YEAR CONTRACT])

/ ([Dim Group Rubric].[Group Rubric Description].[TOTAL BU PVN], [TOTAL YEAR BU])

* ([Dim Group Rubric].[Group Rubric Description].[TOTAL BU BO + ADM], [TOTAL YEAR BU])



SELECT

NON EMPTY {[TOTAL YEAR CONTRACT],[TOTAL YEAR BU]}

ON 0,



{[Dim Group Rubric].[Group Rubric Description].[BO + ADM Cost]}

*

UNION(

[Dim BV Organisation Finance].[Business Unit].[All]

,FILTER(

[Dim BV Organisation Finance].[Business Unit].children

,[Dim BV Organisation Finance].[Business Unit Code].currentmember.name

= '071MIND1'

)

,FILTER(

[Dim BV Organisation Finance].[Business Unit].children

,[Dim BV Organisation Finance].[Business Unit Code].currentmember.name

<> '071MIND1'

)

)

ON 1

FROM (SELECT ([Dim Year].[Year].&[2008]) ON 0

FROM (SELECT ({[Dim BV Organisation Finance].[Business Unit Code].[071MIND1]

,[Dim BV Organisation Finance].[Business Unit Code].[071DIDD1]}) ON 0

FROM [BV Contract Margin DW]))


When I launch this query I obtain:
TOTAL YEAR BU
BO + ADM Cost All - 45013 (I would like to obtain here - 90651)
BO + ADM Cost 071MIND1 - 35680
BO + ADM Cost 071DIDD1 - 54971

Please do you know what should be changed in this query to obtain the good results?

Thanks.

Guillaume

View 3 Replies View Related

Db_datawriter Member Could Not Select???

Nov 1, 2000

Hi:

Here is the question:
I add a user with "sp_adduser 'ABC', 'ABC', 'db_datawriter'" to the database role. However, the ABC login and password was rejected from select?

in ASP include file:
strConnect= "driver={SQL Server};server=ServerA;uid=ABC;pwd=ABC;database=Cu stDB"
--Error: [Microsoft][ODBC SQL Server Driver][SQL Server]
--SELECT permission denied on object 'tblCustomer', database 'CustomerDB', owner 'dbo'.

Do I have to give db_datawriter selection permission?
According to the books on line: this role has insert, delete and update rights

thanks
David

View 3 Replies View Related

Can Not Sysadmin Member See And Run Jobs From EM?

Jan 25, 2002

Hello everybody .
I have a group - SQL support.I want to give them rights to run any job from EM but I don't want them be a part of sa group
What rights should I give them ?
All existing jobs owned by members of sysadmin group.

Thank you

View 1 Replies View Related

Create Dimension Without Member

Apr 7, 2006

Hi

Analysis manager won’t let me create dimension unless fact table filed has value init. Other words, how do I create MT dimension(dimension without member)

thanks

View 4 Replies View Related

Can I Hide Displaying A Certain Member?

Apr 25, 2006

Hi,

I have a dimension called customers having the following levels:

ALL
Level 1 CustType
Level 2 Cust Rank
Level 3 Cust Name

Suppose that the possible CustTypes are "Potential", "Active", "Lost".
Is it possible to hide displaying Level 1 and below if the Custtype (Level 1) = "Potential"

View 2 Replies View Related

SQL 2012 :: MDX Creating A Member

Apr 30, 2015

I have a

[Project].[Project Status]

there are 4 statuses

Open
Cancelled
Closed Complete
Closed Failed

I want to create a member that groups the closeds..Can you use case statements? case when 'open' then 'open' when 'Cancelled' then 'Cancelled' else 'Closed' end.

View 1 Replies View Related







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