Showing posts with label attribute. Show all posts
Showing posts with label attribute. Show all posts

Monday, March 19, 2012

Meaning of TextQualified attribute in flat file connections

Can anybody explain what the meaning of the TextQualified attribute on a flat file connection is? I am importing delimited flat files where text columns are not qualified by quotes. If I use the Suggest Types button in the Flat File Connection Manager Editor, it sets TextQualified to True for all columns. Importing works fine than, but it also does with TextQualified = False. So what's the difference?

Hans Geurtsen.

If TextQualified=TRUE then a string surrounded by quotes will get interpreted as just the string. In other words the following 2 entries in the file will be loaded as the same:

ThisIsAString
"ThisIsAString"

So it depends on the nature of your data as to whether the TextQualified property has any effect or not.

-Jamie

Monday, March 12, 2012

MDX TopCount

I am using a MDX to get the TopCount and it is working. The issue is that there are typos and miss spelled words in the primary attribute of my selection.

Therefore, I am trying to use a calculated member to get the intersection name (see code below). I am getting "#error" for the [Measures].[Intersection] in my results.

if I add the [Crash].[Intersection Streets].[Intersection Streets] in my topcount expression then I get the wrong topcount result (typo's).

Any ideas how to accomplish this.

Thanks,

with

Member [Measures].[Intersection] as

' [Crash].[Intersection Streets].[Intersection Streets].currentmember.uniquename'

select

{[Measures].[Crash Count],

[Measures].[Injury Crashes],

[Measures].[Fatal Crashes],

[Measures].[Fatalities],

[Measures].[Intersection]}

on columns,

Topcount( CrossJoin([Crash].[County].[County],

[Crash].[City].[City],

[Crash].[TS Crash Route].[TS Crash Route],

[Crash].[TS Crash Mile Station].[TS Crash Mile Station] ),

10, [Measures].[Crash Count])

on rows from

(select ([Crash].[County].[County],

[Crash].[City].[City],

[Crash].[TS Crash Route].[TS Crash Route],

[Crash].[Intersection Streets].[Intersection Streets],

[Crash].[TS Crash Mile Station].[TS Crash Mile Station])

on columns from [SDM_Reports]

where ([Crash].[City].&[Springfield]))

where ([Reportability].[Is Reportable].&[Yes],

[Crash].[Is Intersection].&[Yes],

[Crash].[Statistical Year].&[2004])

Orville,

I am not sure I understood your question, but if you just want to ignore errors and treat typos as 0, you can use IsError function. Example:

IIF(IsError(<yourMember>), NULL, <yourMember>)

|||

Thanks you for reply. Let try to clarify my issue.

There are typos is the street interesction attribute that is resulting in the wrong results. Therefore, I can construct the topcount using an attribute called station which is a numeric representation of the interesction data. However, I would like to retrieve/select the the first instance of each intersection name to be returned with the topcount. Our end users need the intersection name with the the topcount for reporting.

|||

Orville,

I understood that you want to do TopCount on one dimension, but then show not that dimension members, but some other values. It is probably possible, as you could probably have Station attribute with Intersection beeing defined as attribute property. But I would strongly suggest that you try to clean your intersection data before you actually load it into data warehouse. Trying to deal with cleanup issues in MDX is quite expensive in terms of time it takes to write logic and performance penalty from SSAS query.

It is quite possible that I did not understand your question, so if anyone else has better idea on how you can do this, I would be happy to read it too.

Vidas.Matelis <at> SSAS-Info.com

|||

I think the #Error in your calculated member could be fixed by removing the level reference from your calc. The quotes around the expression are no longer necessary in SSAS 2005 either.

eg

Member [Measures].[Intersection] as [Crash].[Intersection Streets].currentmember.uniquename

MDX to get member names?

I want to get a list of member name for an attribute, without accessing the fact table, for speed.

I can write a statement like "select {Measures.SalesAmount} on columns, {CostCenter.Members} on rows from MyCube", which will give me a list of Cost Centers going down. Is there a way to get this same list, but without accessing the fact table, with the hopes that the query will execute faster?

Thanks for any assistance,

Ernie

Assume the CostCenter attribute belongs to the dimension [CCDim]

select CostCenter.members on rows

from [$CCDim]

|||

Works great.

Thanks Jeffrey!