I need some basic help with SSAS 2012. I have my employees dimension. Here is an example:
Here is my hierarchy, the default one when creating the dimension:
My problem is that when querying the cube through excel, when showing only the name, it appears twice. I know it has two different IDs, but I am not showing the ID, just the Name in the columns and a value in the Metrics.
It appears like this:
How do I make it group correctly?
Thanks
Change the KeyColumns of the Employee Code attribute to just the Employee Code field (the column called Name on your table). Including Employee Key as the key in the Employee Code attribute is the issue. It should just be in the KeyColumns for the EMPE KEY attribute.
I didn't see any problem in your dimension in the technical perspective.
If you just need a distinct value in Excel, you just need to configure the pivot table property to 'group' the duplicate name:
Right click the pivot table in Excel book, find the menu over there.
Related
I have a tbl_ProjectList that includes the project's Name and End Date.
A qry_cboProject queries this table to only display projects in a combobox on Subform A where the End Date is after the selected date on Subform B, both on Mainform C.
On Subform A, a macro copies (INSERT INTO SQL) projects from Subform B's previous months into the new months. However, if an out-of-date project gets copied over to a new month, the combobox field would be empty for that record, even though the Key exists on the back-end.
I've tried playing with the combobox's properties on Subform A by changing the Bound Column, Column Count, Column Widths, and Limit To List, but am only able to get the out-of-date project to display by its Key, rather than its Name.
The front-end reasoning for this macro is that employees do not have to repetitively select the same projects for each month, and employees already working on out-of-date projects may still need to put in some hours to close out the project.
Does anyone have any suggestions? Thank you in advance!
The order in which fields show up in you combo box depends on how the control source is querying the information i.e. to get name and not the key to show up in a combobox using the a control source query like the following:
SELECT Key, Name FROM tbl_ProjectList
You would need to set the following attributes:
Column Count: 2
Column Width: 0"; 2"
Bound Column: 1
It sounds like you may need to requery the control source as well. This should cause all the information to update.
#Parfait - apologies for not describing my problem in more detail. There are multiple subforms on one main form to allow the user to select a date in one subform, which populates projects on a second subform and responsibilities on a third subform.
Jeffrey's suggestion made me realize that the underlying query to the combobox should be adjusted for projects that are carried over into new months, where a foreign key exists in the underlying tbl_ProjectUserEntry
Therefore, I added a WHERE criteria to the query, which uses a DLookUp function to see if the foreign key exists:
DLookUp("[DateID]","tbl_ProjectUserEntry","[DateID] =" & Forms.frm_UserEntry.tbDateID) IS NOT NULL
frm_UserEntry is the main form..
Again, apologies for my brief description to a complex problem.
I have a PowerPivot table that has a column of IDs and a linked table that contains a set of specific IDs that I want to use to create an indicator variable which I can use to sort on in existing tables and charts. Essentially I want:
If the value in column EpisodeID is found anywhere in LostEpisodes[LostID], then return the value "1", otherwise "0".
LostEpisodes is the linked table and LostID is the column that contains the subset of IDs I want to be able to sort on.
I have tried using =IF(VALUES(LostEpisodes[LostID])=[EpisodeID],1,0) but got an error. Is my syntax wrong or should I be using a different approach? Seems simple enough, but I am new to PowerPivot and DAX.
Thanks
OK - So I have found an answer that works and wanted to share. Others may have more elegant solutions, but this worked. This is where I miss MATCH.
I have a linked table called LostEpisodes which contains 2 columns, EpisodeID and Lost (all contain the value of 1 as they are all lost episodes). For my purposes I am manually entering the episode IDs as there are only a few. EpisodeID is also in the main table and is the column I am matching on.
I started with one new column labeled LostLookup with the following formula:
=LOOKUPVALUE(LostEpisodes[Lost],LostEpisodes[EpisodeID],[EpisodeID])
I then created a new column with the following formula:
=if(ISBLANK([LostLookup]),"NotLost","Lost")
This creates the indicator variable I can now use in pivot tables and charts. I have tested it and it works great.
Hope this makes sense!
I am having problem trying to group my dimension by the year using SSAS. This is the first time for me deploying a cube. Is there any way so that I can simply group the year rather than seeing multiple lines of the same year (please see the attached image)
Check the KeyColumn property of the attribute GL Year, if the value of the Key is equal, they'd be automatically grouped. What you see in the list is the NameColumn property.
More info on MSDN and on MSSQLTips.
Update:
For KeyColumns property, MSDN states:
Contains the column or columns that represent the key for the attribute, which is the column in the underlying relational table in the data source view to which the attribute is bound.
This means whenever the value of the column(s) specified in this property are equal in the underlying table for any number of rows, SSAS will treat all these rows as one Member.
In your example, say if you have a column GLYear in your relational table and in KeyColumns property you have specified the same column, the resultant list in your screenshot will have a single value for each year. Hence, all rows with value 2015 will be combined together to form a single member in that list.
I am using SL5 based ComponentOne's C1FlexGrid and binding data to the control at runtime. For two columns, I am populating lookup data as dropdowns in the first and second column of the control. In the first column, I am binding company information and in the second column, I am binding department information by default. There is a 1-N relation between Company and Department entities in my model (that is, for every company, there are N no of departments associated to it).
In edit mode, I want to filter out departments in the second column of the control for the selected company in the first column (that is, when I select "company 1" in the dropdown, I want to bind only those departments associated to company 1 in the second dropdown). Is
this achievable?
I have achieved this by following the suggestion mentioned in the forum post Different drop down list/combo box in the same column? .
How do i hide an attribute from appearing as a field when creating a pivot table.
e.g. i dont want the user to see the PK of a dimension. Thanks
Within SSAS, set teh AttributeHierarchyVisible value to false on the value of the dimension that you wish to hide from client tools. You will find this property available on each of the dimensions attributes.