Why doesn't my second "Rows" field roll up into the first in PivotTable? - excel

I'm developing a cube, and using PivotTable to play with said cube. I have this issue and I don't know if I'm seeing this because:
This is just the way it is, or
I'm missing something in my cube relationships, or
I'm missing something in excel.
I have a Kimball-like Date dimension that is role playing. In my cube's Dimension Usage tab this dimension ("Document Create Date") has a referenced relationship to my "Document Count" fact table through the "Document" dimension.
In excel, I want to set up my PivotTable so that I can drill down in my rows through the dates and eventually into one of the "Document" dimension's fields (Document Number) only when I've gotten to the leaf level of the "Document Create Date" hierarchy.
Currently, when I add to the "Rows" area in PivotTable first the "Document Create Date.Calendar" hierarchy and next the "Document Number", all the Document Numbers always display. They display in the correct area (ie: under the correct place in the Date Hiearchy) and the totals are ok, but they're all there.
Your help is, as always, much appreciated.

This is just the way it is. If you add a hierarchy, its first level below the "All" member is always expanded. Of course, you can remove and add the hierarchy on demand, but if you add it, it will always be expanded in Excel pivot tables - as well as in most other client tools.
To get the behavior that you want, you could create a hierarchy (in whichever dimension you feel it would make sense, maybe a new one) that contains the levels of the date hierarchy, and below that a level containing the document number. But this would mean that you would have to replicate the date dimensions' attributes to the dimension containing this hierarchy.

Related

Excel Pivot Table filters values changing on source update

In our BI infrastructure we're using Excel's pivot tables to expose the data in an Analysis Service instance (the cube), and thus far we have nothing to complain about.
Excel "reports" can be defined containing pre-selected dimensions as rows, columns and filters, for example we can set the Time dimension as a column slicer, or the Country dimension as a filter slicer. This allows the users to access this pre-defined report with the slicers already in place where they just have to select there own values to slice with if needs be.
However, even tough this is working perfectly the issue emerges when we try to actually pre-define specific values in a filter slicer. These values are getting "randomly" changed after a few days without any particular pattern from what we can observe. (Note that the cube i.e. the data source is being updated daily)
For example, we want to create a report were the users would have the data already filtered by the countries Italy and France upon opening it. So we created a report where we have the Country as a filter slicer and the countries Italy and France set as specific slicers under the Country filter.
Now the problem is that this report would maintain it's structure and selected filter values for just a few days, after which Italy may get de-selected and Germany would now be selected, or only France is maintained as a slicer. And again, we can't seem to observe any particular pattern in these changes, neither the time it's taking to "lose its format", or the filter values being selected to filter with.
Furthermore, note that even tough the underlying data source is changing daily, the pre-selected values are always there and never deleted, i.e. Italy and France in this case, would always be available in the data source. In fact you could still select them in the report, even tough they are no longer selected by default.
Anyone can help us understand why this is occurring and what can be done to go around it?
EDIT
Just realized that the slicer which values keeps changing every once in a while, is a column in another table. For example the Country Italy is in reality a column in a table City and therefore can be found in multiple records such as Rome, Milan etc., and then is exposed as a dimension in SSAS.
In PivotTable Options/Data there is an option called: "Number of items to retain per field" which default is set to automatic.
I believe this might be what causes it to work at random, and then suddenly change. Try changing it to 'max'.
Install BIDS Helper and open Your source code in Visual Studio. Then run Dimension Health Check on the City dimension. I expect it will show some attribute relationship uniqueness issues. Fix the keys or attribute relationships and your problem should be fixed. If you need help knowing how to fix it post a screenshot of Dimension Health Check here.

How to visualize more attributes of a dimension in Pivot table in Excel 2016

I have a SSAS cube where one dimension is "User".
User has many attributes, say "Email", "Mobile Number", "Address" and (many) more.
I build a Pivot table in Excel 2016 where I can easily find which Users, for instance, placed orders in the current month.
Now, I want to visualize for each of these users several of the possible attributes: I just need to easily get the list of email and mobile numbers of the users that placed orders in the current month.
If I drag the required attributes in the Pivot table though, these are used to further split each row: under each User in the Pivot there will be a level with just one Mobile Phone and this will be further divided in one email and so on.
What I need is, instead, keeping the division of the Fact "Order" only by the dimension User, and for each User to just visualize some more fields.
What's the best way to achieve this?
The only way we can think of so far is to have an additional attribute with the concatenation (comma separated?) of all the needed information. But this is honestly horrible. The aim should be to have each of the additional attributes in its own excel cell.
I think you are looking for something like this ...
Pivot-Table options -> Display -> Classic PivotTable layout
For each field on your pivot table, Field Settings->Subtotals->None
From this raw data ...
And the options above, I generate this Pivot Table ...
I can't comment on Excel 2016, as I'm using XL 2013.
But in my pivot table, I can right-click on the default-displayed value for the dimension (I guess this would show the user Name for your User dimension - for me it's a Products dimension).[
Then select "Show Properties in Report", and select the one you want.
What it shows is what you get in the Tooltip popup when you hover over the cell. It doesn't seem to treat these extra values as extra dimension levels, with a Cartesian-product relation to the leaf-level you're looking at: it correctly just reads one value per leaf member.
Is there maybe some switch in your dimension design you need to flip to get Excel to do this? My dimension has these "properties" as dimension attributes, with AttributeHierarchyVisible=True, AttributeHierarchyEnabled=False.
I only have 2 of these defined (Current Product Code and ID). For some reason this Excel functionality also includes the immediate parent level of the leaf level in the hierarchy (Category) as a "property".

How to create a view using a count of certain field

I am trying to create a categorized view of all Notes documents that have a field with exact same value, i.e. there is a field for Contractor Name and I want to create a view that lists each Contractor and the documents that relevant to each. How do I do this? I have tried view formulas like the following but no success as yet
SELECT #IsAvailable(Contractorid) & #Count(Contractorid) > 1
SELECT #Count(#IsAvailable(Contractorid)) >1
Nsf databases are no relational databases. The count of different documents with a unique value in a specific field cannot be used to build a view selection formula.
You could write an agent, that runs through all documents and counts them and puts all with count > 1 in a folder, but this is quite a lot of LotusScript code and needs some advanced knowledge.
The other possibilit would be to categorize the view by ContractorId and add one column before that categorized column: simply use 1 as column formula and select "display totals" in the column properties as well as "hide details".
Then at least you have the information, how much documents are in each category, but unfortunately you cannot filter by it and you cannot sort by this column.
A third possibility would be to use an xpage interface, but that is even more work to do and a completely different story developmentwise.
This is similar to view to identify duplicates. My approach is to use folder.
Make a new folder with design of your view. Instead of (not working) selection formula use short LS code as an action, or QueryOpen event (make sure only one user runs the script).
The code should cooperate with another (hidden) view sorted by Contractorid. Make a ViewNavigator for that view and traverse through it with simple logic - if previous entry has the same Contractorid as the current one, put both documents into folder**. That way you will get list of all documents with duplicate Contractorid. Make sure to wipe all the current content from the folder at the start.
** This can be optimized further by slightly more complicated algorithm to handle first duplicate diferently - for more than two duplicates this algorithm makes extra calls of PutInFolder method.

How to create m2m relationship in PowerPivot

So I am trying to link an employee metrics pivot chart with an employee project table with one slicer. I want an employee slicer that manipulates all charts but the data is coming from 2 different places (SQL, Sharepoint). When I try to create a relationship based on Employees I get the following error: "The relationship cannot be created because each column contains duplicate values. Select at least one column that only contains unique values."
So one chart has quantitative items while the table has qualitative items and I want one slicer to manipulate both at the employee level.
I want to see all the data on both charts for the selected employee, and not just single items linked by unique values. I can use unique values, and have created relationships that one slicer can manipulate however I only get one record at a time that way and therefore the slicer has thousands of buttons (one for each record).
I wouldn't think this would be that difficult and I hope it's really not.
Please Help!
M2M relationships in PowerPivot will most likely cause more headaches than solutions unless you are aware of what you are doing. After some thought, I realized that I really do not want an m2m relationship because it would result in junk data for what I wanted. I just wanted to start my answer off acknowledging that I did not achieve an m2m.
So if you want to link SharePoint data to Excel here is what you need to do:
Export SharePoint data as an RSS feed. If this is something others will need to refresh then the rss file will need to be stored on a shared drive.
Add PowerPivot if you have not already done so. In PowerPivot get external data from other sources (rss feed) then add your file. To link data you will need a Unique ID to join tables on.

Managing dates in Section Headers with Core Data

I have conceptual issue with using core data. My app lists events by title in the main tableview then navigates to a tableview which is unique to the event. Here it's supposed to display in the section headers of the tableview an event date, a list of dates that expand a range (requires calculation) or list of unique dates.
I have arranged this in the model with 3 entities. Event & Date have a one to one relationship. Date to Menu have a one to many relationship. Menu contains the data for events that have unique dates, Dates contains events that either have a start date or in some cases when it's a range an end date.
Ok if the above is clear my question is how do I do create a list of section headers unique to an event? Bear in mind that NSFetchedResultsController only provides the ability to return a section name from a managedObject. I think this is what's throwing me.
Do I fetch the data unique to the event then use FRC to create arrays to populate the section headers and live with the table not being managed? Or is there a smarter way?
I don't really understand your model but I think it looks something like this:
Event{
name:string
date<-->Date.event
}
Date{
event<-->Event.date
menus<-->>Menu.date
}
Menu{
date<<-->Date.menus
}
If this isn't correct, you might try editing the question with the data model in this format it can be better understood. (if you can't edit, just fold the format into a comment and I will add it. Alternatively, send it me in an email.)
I'm not clear on what data you want in your Event table section titles. Sections are intended to be groupings of managed objects based on some attribute of those objects. The canonical example would be Contact.app's contact list. The contacts are grouped based on alphabetical value of the first letter of the last name.
Once common mistake is to think of a section table as representing hierarchal objects with the section titles representing superior objects and the rows representing inferior e.g. yo have a model to simulate a file system so you have a Directory entity and a File entity. You try to set the section titles to the name of the Directory and the rows to the names of the related File entities. That would not work smoothly and would not really mesh with the interface grammar that the user has learned for section titles. Instead, you should have a hierarchy of tableviews with a table showing all Directory objects and then a second table view showing all the File objects related to the selected `Directory object.
So, if the section titles you want come from any object besides Event you are probably approaching the problem from the wrong angle.

Resources