.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Set default member based on an attribute

Posted By:      Posted Date: September 20, 2010    Points: 0   Category :Sql Server


I have a time dimension which is based on a time_dimension table. This has a column called current period which can be set to 0 or 1. My requirement is that I want to set the default member of my Year attribute (which is also part of the time hierarchy) to that value in my dimension table that has current period set to 1. How do i do this?


View Complete Post

More Related Resource Links

From 3.5 to 2.0: No default member found for 'DataTable'



I'm trying to change the framework of an application I made a while from 3.5 back down to 2.0 as it's not compatible with the new server we put in (we're don't have permission to install 3.5 framework).

So, I went into the project properties and under the Compile tab, changed the project to 2.0. When I tried to publish the project I got a lot of errors and warnings and the publish failed.

In the 3.5 code, I had SQLSelect statement in a Dim which was labeled 'As DataTable'. When switching to 2.0, an error appears on the Dim saying: "Class 'System.Data.DataTable' cannot be indexed because it has no default property". So I simply took DataTable out of the code. Now, when I try to run the project, I get "No default member found for 'DataTable'.

Here's the code:

Function DisplayName(ByVal LoginName)

     Dim tempname(2) As String
     Dim signon As String

     tempname = Split(CheckUser(LoginName), "\")
     singon = tempname(1)

     Dim rst 'As DataTable
     rst = ExecSQLSelect("SELECT given_name, surname FROM ... etc")

     If rst.Rows.Count = 0 Then
          DisplayName = "Unknown"

          'This is where the error is:
          DisplayName = rst(0)("giv

Can the default member for the sql server analysis filter web part be a mdx expression or not

I have designed a dashboard , some parametrized reports ( on date and time) in my case with a cube as datasource, added an analysis services 2005 filter, connected it to the reports. The issue concerns the default value for the filter . I f I choose [Date Local].[Calendar Hierarchy].[All] it works well. But the business requirement is to use the last day where there have been registered a measurement which in my case looks like the following mdx expression: Tail( Filter ([Date Local].[Date Key].[Date Key].Members , ( ( [Advisor Organisation].[Advisor organisation].[Contact Center].&[Denmark]&[Kundelinjen], [Measures].[Calls Offered] , [Date Local].[DK Holiday].&[False] , [Date Local].[Week Day].&[True] ) > 0 ) ), 1).Item(0).Item(0) The expression is all right as I use it in my report as an mdx filter expression. But when I use apply it I get an invalid dafault member value. So the question is : Does the filter support an mdx expression ? If yes, is there another syntax or change in order to make it work ? Thank you a lot for your answer.

Dimension member based on period

Hi, I have done several SSAS cubes in the past, but this is the first time I have run into this problem. I have tried searching for an answer online, but I am unsure of how to pose my question/search appropriately. After many hours of searching (someone MUST have run into this before), I thought I'd try the forum. I will be using SQL 2005 SSAS. The issue concerns a dimension that is linked to my fact table via a middle table that creates a many-to-many relationship. This middle table contains a date that the cube would need to be filtered on (which would be a further dimension, I assume). Note that I plan on allowing reporting on the cube via MS Excel (pivot tables). My table structure (highly simplified for testing purposes, it contains upwards of 15 other dimensions) is laid out as follows: --dimension = RecordableInjury CREATE TABLE [dbo].[safe_RecordableInjury](  [RecordableInjuryID] [int] NOT NULL,  [RecordableInjury] [varchar](100) NOT NULL,  [RecordableInjuryShort] [varchar](5) NOT NULL ) --fact = Injury (the measure on this table will be a distinct count of InjuryID) CREATE TABLE [dbo].[test_Injury](  [InjuryID] [int] NOT NULL,  [IncidentDate] [int] NOT NULL ) --joiner between fact table & RecordableInjury dimension CREATE TABLE [dbo].[test_InjuryRecordability](  [InjuryID] [int] NOT NULL,  [StatusDate] [int] NOT NULL,

populate dropdown based on attribute criteria

Trying to load a dropdown list with the 'name' attribute from the category node...must be missing something: The xml: <Settings>  <department name="Accounting">    <category name="Bank Information">    <category name="Form Information"></Settings>    The code I'm attempting: XmlDocument settingsdoc = new XmlDocument();                settingsdoc.Load(Server.MapPath("/XML/Settings.xml"));                XmlNodeList nodeList = doc.SelectNodes("Settings/department[name='Accounting']");                 foreach (XmlNode node in nodeList)                    CategoryDDL.Items.Add(new ListItem(node.SelectSingleNode("//department/category[name]").InnerText)); CategoryDDL.DataBind();   Any idea what looks wrong? Thanks!

how to set default value to one parameter based on another parameter value



I have two parameters in a SSRS2008 report which are named as,

1) @showclient - datatype bit

2) @client - datatype varchar. ( This is dependent on @showclient parameter)

I want an expression to set the default value for @client parameter to be " noclients" when the value of @showclient parameter is set to 0( zero).

Thank you.

incorrect attribute member names


i'm seeing incorrect attribute member names in my degenerate dimensions.

the dsv looks like this:


SO records, AR records, and Customer records are all associated with a Location.  SO and AR records are also associated with a Customer.  in some cases, the SO or AR record LocationKey is different from the LocationKey of the customer record that a SO or AR record is associated with.

when i create a cube and dimensions based on this dsv, it seems like initially everything is fine.  however, inevitably i eventually see the following:

the AR and SO degenerate dimensions each have a Location attribute, with the fact table LocationKey column as the key, and the Location table LocationName column as the Name.  at some point, the attribute member names will begin to appear as the Location name that is associated with the LocationKey from the Customer table, rather than the appropriate fact table (AR or SO).  it seems that this begins to happen after the relational database is updated. that process generally consists of deleting all fact table rows and repopulating.  when this problem appears, "Process full" on dimensions, partitions, measure groups, or the cube does not seem to resolve the problem.

i witness this error

How to change the Default Value of the Parameter to "Query Based"


Hi I have a Report which i deployed into my localhost.

In the Report Manager, Report Parameter Properties, I unchecked the HasDefault option for which Default value is coming from some Query.

When I retry to Set the Default Value to Query Based, Its not taking.

Need Help.

Setting the default value of one row based on the value entered by the user in another row in the Re

Hello Everybody,
I have designed an InfoPath form where I have 4 columns (Question, Answer, Score, and Comments) in a repeating table. I have added 10 rows in the repeating table by going to Tools --> Default Values. Answer is a radio button with choices of Yes, No and N/A. When a user is filling out the form, is it possible to set the answer of one or more related questions to "N/A" and make them read only (the user shouldn't be allowed to select the answer for these questions) depending upon the answer of another question? Please let me know how to go about doing this.

Thanks in advance for your help!!

Admin panel access based on memberOf attribute


Hey Guys,

I have built an intranet site where the user is automatically logged in through Windows Authentication and I am now building an admin panel/section.

I was wondering if there is a way using the Active Directory memberOf attribute that people who are members of the group 'Domain Administrators' could automatically gain access to this section without needing to log in, but people who are not part of this group get redirected.

Any help would be greatly appreciated.

Many Thanks,


Unable to obtain the current member because a non-aggregatable attribute has a calculated member coo

Hi All,

I am getting this error with following mdx:

SELECT {[Measures].[Sent],[Measures].[Bounced]} ON columns,
Order(Hierarchize(Union({[Account].[Account Name].[All]},
[Account].[Account Name].[All].Children)), [Measures].[Bounced], ASC) ON rows
FROM [MyCube]

Please note that this error occurs on an empty db but not on a db with data.

Please help me to understand why this is so and what/where exactly is the error.

Thanks in advance.   .

Hide a calculated member output based on condition


Hello:  New to SSAS.   Is it easy to alter this caluculated MDX to HIDE or not make visibile the output(Average_Response) if Respondents are < 10? 

However, I only want to Hide the value.   It still needs to be used for aggregate calculations.

Thank you!

CREATE MEMBER CURRENTCUBE.[Measures].Average_Response


AS [Measures].[ResponseGiven]/[Measures].[Respondents],


Is there a VB.Net equivalent to the "" attribute of a C# based view?


Is there a VB.Net equivalent to the "<dynamic>" attribute of a C# based view?


<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

Creating a default member on date hierarchy



I am trying to set a default member on a date dimension.

I have an attribute form the database of IsToday which is a boolean with the value of today eg 23/11/2010 showing as true.

When i go into the Date dimension and try to select [Date].[Is Today].&[True] in Choose a member to be the default I get the error below

DefaultMember(Date,Is Today) (1, 1) The level '[Date]' object was not found in the cube when the string, [Date].[Is Today].&[True], was parsed.

Does anyone have any ideas why this is?


New Dimension member not selected by default in the Pivot Report


Hi Guys,

We have excel report where the some members of a dimension is selected and the data is browsed based on that. The report works good if there are no new members added in the dimension.

When the dimension is processed and the cube is processed, if there comes a new dimension member then that member get selected by default and the report fails. I am looking for way to remove the default selection for the new members added to the dimension. Please let me know if there is a possible way to suppress the default selection of the new members in a dimension.



Create Scripts creates invalid default values for CLR based Stored Procedures


Hey, Microsoft-Connect-Team,

why did you close this issue without even dealing with it??? This is a problem description!!

Vote here for a Microsoft Connect feedback channel on Windows - and win a better Windows!

Default date dimension member


Hi All,

Is there a way to set a default member in the date dimension so that it will be automatically observed by Excel as a filter?

I have a stock cube which shows stock levels by day. At the moment, users have to change the day filter manually in the Pivot. I'd like it so that it refreshes automatically based on a cube setting so that it is centralised.

It appears I can set a default member for the date attribute, but without selecting date as a specific filter it shows the last non empty value (as defined by the cube structure). I need it to show the stock as per the specific date.

I've accomplished this before using vba in the Excel file, but wondered if there was a better method. Unfortunately named sets don't work in Excel as filters and I don't want to see the date on the rows/columns.

Many thanks,


5 GridView Themes Based on Google's Personalized Homepage (igoogle)

One of the silly features I have found that I like about igoogle is how the pages color palette changes depending upon the time of day. So as the day progresses from morning to afternoon to evening the colors on the page change as well. Like I said, I know this is a silly feature, but I like it. And I have asked around a little bit and seems like other people like it to. To get a better idea of how the colors change, here are the background images from a few of the HTML elements.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend