.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

Excel 2007 Cubeset function needs to pull list based on part of field value (ie contains, wildcardin

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

I have a Cube with a field called 'Item Code'.  This field is six characters in length.  The first two characters differentiate what kind of product it is.  I am building my reports with cube functions.  I do not want to use a pivot table to retrieve the list by using the 'contains' or 'begins with' label filters.  Is there a way to use the cubeset function with left, mid, right functions?  I realize that it can be set up in the cube as a separate field, but I am not able to update the cube.  Below are my examples - 'All Products' and 'Product R3189S' work fine, but I need to retrieve 'Products starting with R3'.

=CUBESET("Financials Sales Cube", "[Product Dimension].[Item Code].[All Product Dimension].children", "All Products")

=CUBESET("Financials Sales Cube", "[Product Dimension].[Item Code].[All Product Dimension].[R3189S]", "Product R3189S")

= CUBESET("Financials Sales Cube", "[Product Dimension].[Item Code].[All Product Dimension].[R3****]", "Products Starting with R3")

Thank you in advance.


View Complete Post

More Related Resource Links

Excel 2007 Cubeset function - Retrieve subset of customers based on state


I am working on making a report dynamic by allowing a user to choose a State and have the cubeset function return that State's customers.

I have the following

Cell $P$5 =CUBESET("Connection", "[Order Ship to Code].[Order Ship To State].[All Order Ship to Geography].children", "Ship to State")

Cell P6-P32 = CUBERANKEDMEMBER("Connection",$P$5, ROW(A1*))           *A2, A3, etc.

Cell $A$2 = "CA" ("CA" is choosen in the list of states based on a validation list pointing to the CubeRankedMembers in P6-P32)

=CUBESET("Connection", "[Customer Dimension].[Customer Name].[All Customer Dimension].children", "Customers") returns all customers

I have not been able to write a CubeSet function that combines the two sets to retrieve, for example, California Customers

This two functions I have written that are not working correctly...

=CUBESET("Connection", "([Order Ship to Code].[Order Ship To State].[All Order Ship to Geography].["&$A$2&"],[Customer Dimension].[Customer Name].[All Customer Dimension].children)", A$2&" Customers")

=CUBESET("Connection","[Order Ship to Code].[Order Ship To State].[All Order Ship to Geogra

Exporting MOSS 2007 List to Excel 2007

When doing the export, the columns "Item Type" and "Path" are automatically displayed in the sheet.  Is there anyway to suppress these fields from exporting automatically?  I'm sure this has already been asked before, but I couldn't find anything after much searching (perhaps I'm using the wrong keywords).  Any help would be greatly appreciated.

Cannot List SSAS Catalogs in Excel 2007

I am trying to access SSAS 2005 through excel on a client computer.  I get the following error message:  The data connection wizard cannot obtain a list of databases from the specified source.  It looks like I connect, but I cannot list any of the catalogs.  Both catalogs are migrated from a sql2000 database.    I ensured that the account has a browsable role through the roles in SSAS.  Interestingly if I create a UDL file with a connection to ssas and choose existing connections and specifiy the udl file I can access the specific ssas catalog.  In creating the udl file I cannot see the catalogs, but I can type in the catalog name which connects me and allows me to browse the cube using excel.  Unfortunatley, my users use other applications besides excel which don't allow access through udls.  Any help would be appreciated.

Range or List Filtering via SSAS cube in Excel 2007

Hi All, A client has posed an interesting question, as current users of business objects webi they can filter the results of a cube/universe by copy and pasting a range or list of values seperated by a ';' into a list filter that is availble. e.g. product2;product533,;product029;product8389 etc etc. The list can sometimes be hundreds long. How is that same function acheived in browsing a ssas cube in excel 2007, all I can see is that a user has to use the drop down list and individualy select the values they want. This does not seem like a great method! Any ideas? They are using SQL / SSAS/ SSIS/ SSRS 2008 R2 Cheers DC

Auto-populating a field based on SharePoint Contacts List

Hello! Hopefully a quick question for you gurus :) So, I have two relevant fields in my InfoPath 2007 form: A drop-down list called Contact Name, and a text field called Contact Phone Number.  Contact Name is populated through a SharePoint Contacts List, retrieving their Full Name from that list. What I'd love to have happen is, when the user selects a name from the Contact Name list, have the form auto-populate the Contact Phone Number based on the phone number of the selected name from the SharePoint Contacts List. I tried to set a rule in Contact Name to, when the field is Not Blank, populate the Contact Phone Number with the phone number from the Contacts List, but all that does is populate the field with the top-most phone number, not the one matching the selected name. Any way to do this more accurately, and preferably without custom code? (Client has an explicit requirement to not have any custom code on the form or its associated workflow)   Thank you so much!

how to change the view of SharePoint List based on field?


hi all,

I have different sites in my sharepoint application. in every site i have one list, this list have one field called location. When i open this list in purticular site at the time users  will see only the items where the location filed is equal to the site name.

So please suggest me how we can achieve this?



How can I filter a Sharepoint 2007 libarry list based on current user login?


Hi all.

I would like to know how I can filter a SharePoint library list based on current user login.

Suppose I have created the followings:

1) A SharePoint form library containing bunch of uploaded InfoPath form data.

2) The InfoPath form template contains a promoted text field called "TargetUser" to store user domain login (ex: DOMAIN\JOE) and every InfoPath form file in the library has a valid domain name stored in the "TargetUser" field.

I have created a custom view for the form library and would like to filter this view so only items whose "TargetUser" field matches current user's login ID are displayed.

I went to Edit View page to customize the view and tried to use the [Me] function but I got a "Filter value is not a valid text string" message instead when clicking OK. Apparently [Me] returns a Person/Group data type and the filter cannot compare its value to that of "TargetUser".

I tried using text functions (ex: TEXT([Me],"") hoping to extract default string value from [Me]. The filter accepts the parameter without any error but the resulting fitlered list does not display any items at all.

I have googled this subject for hours but I have not found any solution.

It would be greatly appreciated if anyone can help me t

# string with cross site lookup field value of List in datasheet view in moss 2007

I am getting appended # code value with cross site lookup field value of List in datasheet view, and also i am getting this value while export to Spreadsheet. How to remove this value.....

# string with cross site lookup field value of List in datasheet view in moss 2007


I am getting appended # code value with cross site lookup field value of List in datasheet view. I dont want that hash coded value, i need actual value. Please provide me the solution.



Rajanikanth Rayala

How to hide the list column based on user login in SharePoint 2007

Hi, I have two different SharePoint group named 'Sales' group and 'HR' group. In a SharePoint list i have 10 columns. out of it i want to display 8 column for 'Sales' group and to show all the column for 'HR' group. I want to do this base on the user login. How can i achieve this?. Am using SharePoint 2007.

How To: Filter a link list dropdown field in a form based on Active/Inactive field in the linked li


I need to filter a dropdown field on a form that is linked to another list.  The linked list has a field active/inactive and I only want the active ones to show on the form.

Readonly values based on Privileges in List Edit form in Moss 2007


According to my requirement, i need to show as different sections in List edit form and based on Privileges that sections have to be enable or disable means Readonly values based on Privileges. How to achieve this without using Object model. Please provide me the best approach for my requirement.

Rajanikanth Rayala

Business Data List web part, format field from database as hyperlink


I have a BDC with an entity that selects fields from a table. One of the fields is the full pathname to a file, or it could be a hyperlink.
When I display the entity in a Business Data List Web Part, all fields are displayed as text, without any formatting. I know the formatting can be modified using the XSL editor (under modify web part), I have found a sample with date-time format . Some basic formatting can also be done with de sharePoint designer, but nowhere have I found an example that allows me to format the column with the link as a clickable hyperlink.
My strong points are sql server and .net , but not XSL , can anyone give me an example of how th eformatting needs to be done in XSL?

tnx in advance

Jan D'Hondt - Database and .NET development

Filter Data View Web Part based on a field



I am trying to filter a data view web part based on a choice made by the end user. I have a lookup field in the Pages list that displays the Title of all pages within that list. I want it so that when an end user selects something from that field that it will filter the list accordingly. Do I need to create a variable, parameter or something of that nature?

Any help is greatly appreciated! Thanks in advance.


SharePoint calculated field based on other list values


Hello Everybody!

I have a repeating list that seems like that

List 1

Title    Number


A        10

B        11

A        11

B        9


I need to create a list with a field that contains each different titles from list 1 (A + B) and another column with the sum of the numbers associated with A or B in list 1.

List 2

Title     Number


A         21

B         20


My problem is that I don't know which method using to do that.

Calculated field can only use list field (not external list), infopath can get this but I don't know how to do it.

I wanted to know if someone has an issue other than developing. Because my client doesn't want to pay for a development.

Thank you very much!!!!


Data Form Web Part - Sharepoint Dropdown List as a field in Edit View - Possible?


Hi guys,

I'm building a Sharepoint page with a data form web part that uses custom SELECT and UPDATE statements with an SQL Server connection in order to retrieve and store records of information.

I'm getting along fine, records seem to update how they should etc, but I've ran into a problem with one thing: Sharepoint dropdownlists in 'Edit Template'

So the issue is this: if I replace a textbox field with a dropdown list that is populated with a separate SQL datasource, the dropdown list seems to be unable to show the current value of the field.

E.g. I have a dataview which has a field "FruitID", which I can update just fine by setting the ID value to different numbers. The SQL datasource uses the FruitID to display a list of all available Fruits, (e.g. 1 = Banana, 2 = Apple, 3 = Cherry, etc).

If i open the dataview in editmode, the default value in the dropdown is null, despite the real value of the field being "2", which should show "Apple" in the dropdown.

I can select a fruit and click save, and it will update just fine. But the initial display needs to show the correct value to start with.

Is there a custom binding I should be coding to make this work? I can't configure dropdown <items> on an individual level as they are populated from the SQL server. I can't set "SelectedI

Can I make a generic function that gets any object's name field based on ID?


I find myself writing a lot of functions like this...to get some sort of Name or Text or FullName field, based on the ID ...

        public static string GetAnswerText(int answerID)
            TreatmentIntegrityDataContext data = new TreatmentIntegrityDataContext();
            Answer answer = data.Answers.FirstOrDefault(x => x.AnswerID == answerID);
            if (answer == null)
                return null;
                return answer.AnswerText;

I have one of these functions for almost every object in my database.  Is there a way to consolidate this into one generic function?  For example could I override the ToString() method for every object and then make a generic function GetStringValue(Type T, int primaryKey) that looks up the record based on the ID, and calls the ToString() method for an object of type T?  What would that function look like?

I think it must be possible because I've playing around with a Dynamic Data website which does similar things ... I'm just not sure how to look up the record with a generic type.

Thanks in advance!!

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